diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-11-08 10:48:08 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-11-08 10:48:08 +0000 |
commit | 1f2b4a912dc9713dff45d698a69e50ade8e40b9f (patch) | |
tree | b36c24306392ec5e7d220f0983a6d494be31977b /package/network/utils/resolveip/src/resolveip.c | |
parent | 42954b7559ad1301f19bbca26cfe3d04143a21be (diff) |
resolveip: fix endless getopt() loop when compiled for arm (#12290)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34116 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/resolveip/src/resolveip.c')
-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; |