diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-11-08 10:48:08 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-11-08 10:48:08 +0000 |
commit | 3a81f75d72b241ce5901494cd8ad883aae56648a (patch) | |
tree | 99c3ff091a2b09730c8cb940db053170003ecdc9 /package/network/utils/resolveip/src | |
parent | 0da0dc0f2be730e95d21e024166a19e99c84a41a (diff) | |
download | upstream-3a81f75d72b241ce5901494cd8ad883aae56648a.tar.gz upstream-3a81f75d72b241ce5901494cd8ad883aae56648a.tar.bz2 upstream-3a81f75d72b241ce5901494cd8ad883aae56648a.zip |
resolveip: fix endless getopt() loop when compiled for arm (#12290)
SVN-Revision: 34116
Diffstat (limited to 'package/network/utils/resolveip/src')
-rw-r--r-- | package/network/utils/resolveip/src/resolveip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/network/utils/resolveip/src/resolveip.c b/package/network/utils/resolveip/src/resolveip.c index 310f35ffd5..43c5ae7f12 100644 --- a/package/network/utils/resolveip/src/resolveip.c +++ b/package/network/utils/resolveip/src/resolveip.c @@ -35,7 +35,7 @@ static void show_usage(void) int main(int argc, char **argv) { int timeout = 3; - char opt; + int opt; char ipaddr[INET6_ADDRSTRLEN]; void *addr; struct addrinfo *res, *rp; @@ -49,7 +49,7 @@ int main(int argc, char **argv) while ((opt = getopt(argc, argv, "46t:h")) > -1) { - switch (opt) + switch ((char)opt) { case '4': hints.ai_family = AF_INET; |