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 /sbin/nos-tun | |
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 'sbin/nos-tun')
-rw-r--r-- | sbin/nos-tun/nos-tun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/nos-tun/nos-tun.c b/sbin/nos-tun/nos-tun.c index 83e7144..ee0fc4c 100644 --- a/sbin/nos-tun/nos-tun.c +++ b/sbin/nos-tun/nos-tun.c @@ -96,7 +96,7 @@ Set_address(char *addr, struct sockaddr_in *sin) bzero((char *)sin, sizeof(struct sockaddr)); sin->sin_family = AF_INET; - if((sin->sin_addr.s_addr = inet_addr(addr)) == (in_addr_t)-1) { + if((sin->sin_addr.s_addr = inet_addr(addr)) == INADDR_NONE) { hp = gethostbyname(addr); if (!hp) { syslog(LOG_ERR,"unknown host %s", addr); |