diff options
author | kevlo <kevlo@FreeBSD.org> | 2013-10-15 07:37:30 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2013-10-15 07:37:30 +0000 |
commit | 25842b5eb9566e24190ca4a633b15807d757a91e (patch) | |
tree | c4d4787170d251b8a1370041f91909fb34d82a1f /usr.bin/systat | |
parent | 69104cedb7bd1435005fd8226e3a2cd06d3de77c (diff) | |
download | FreeBSD-src-25842b5eb9566e24190ca4a633b15807d757a91e.zip FreeBSD-src-25842b5eb9566e24190ca4a633b15807d757a91e.tar.gz |
Use INADDR_NONE instead of -1 to check inet_addr() result.
Reviewed by: glebius
Diffstat (limited to 'usr.bin/systat')
-rw-r--r-- | usr.bin/systat/netcmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c index 7ee8f15..f9da13e 100644 --- a/usr.bin/systat/netcmds.c +++ b/usr.bin/systat/netcmds.c @@ -152,7 +152,7 @@ changeitems(const char *args, int onoff) hp = gethostbyname(tmpstr1); if (hp == 0) { in.s_addr = inet_addr(tmpstr1); - if ((int)in.s_addr == -1) { + if (in.s_addr == INADDR_NONE) { error("%s: unknown host or port", tmpstr1); continue; } |