diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-05-06 13:01:31 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-05-06 13:01:31 +0000 |
| commit | cbfbc555e052a54af4b5f69d829b53ceff253f56 (patch) | |
| tree | c863881a8c2fee33b26b5c129abdb0bce013ac7b /sys/netinet/libalias/alias_proxy.c | |
| parent | 412f7416b3bd9862c0771e7477f6a68de4bea2ea (diff) | |
Notes
Diffstat (limited to 'sys/netinet/libalias/alias_proxy.c')
| -rw-r--r-- | sys/netinet/libalias/alias_proxy.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/libalias/alias_proxy.c b/sys/netinet/libalias/alias_proxy.c index a60b79f3aa5e..b2789f36ec13 100644 --- a/sys/netinet/libalias/alias_proxy.c +++ b/sys/netinet/libalias/alias_proxy.c @@ -175,11 +175,14 @@ inet_aton(cp, addr) */ gotend = 0; while (!gotend) { - val = strtoul(c, &endptr, 0); + unsigned long l; - if (val == ULONG_MAX || val == 0) + l = strtoul(c, &endptr, 0); + + if (l == ULONG_MAX || l == 0) return (0); - + + val = (in_addr_t)l; /* * If the whole string is invalid, endptr will equal * c.. this way we can make sure someone hasn't |
