summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bootparamd
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2013-10-15 07:37:30 +0000
committerkevlo <kevlo@FreeBSD.org>2013-10-15 07:37:30 +0000
commit25842b5eb9566e24190ca4a633b15807d757a91e (patch)
treec4d4787170d251b8a1370041f91909fb34d82a1f /usr.sbin/bootparamd
parent69104cedb7bd1435005fd8226e3a2cd06d3de77c (diff)
downloadFreeBSD-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.sbin/bootparamd')
-rw-r--r--usr.sbin/bootparamd/bootparamd/main.c2
-rw-r--r--usr.sbin/bootparamd/callbootd/callbootd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bootparamd/bootparamd/main.c b/usr.sbin/bootparamd/bootparamd/main.c
index 8c93c1f..85a1fca 100644
--- a/usr.sbin/bootparamd/bootparamd/main.c
+++ b/usr.sbin/bootparamd/bootparamd/main.c
@@ -86,7 +86,7 @@ char **argv;
if ( stat(bootpfile, &buf ) )
err(1, "%s", bootpfile);
- if (route_addr == -1) {
+ if (route_addr == INADDR_NONE) {
get_myaddress(&my_addr);
bcopy(&my_addr.sin_addr.s_addr, &route_addr, sizeof (route_addr));
}
diff --git a/usr.sbin/bootparamd/callbootd/callbootd.c b/usr.sbin/bootparamd/callbootd/callbootd.c
index a0a4ef6..7c32fee 100644
--- a/usr.sbin/bootparamd/callbootd/callbootd.c
+++ b/usr.sbin/bootparamd/callbootd/callbootd.c
@@ -104,7 +104,7 @@ char **argv;
case 3:
whoami_arg.client_address.address_type = IP_ADDR_TYPE;
the_inet_addr = inet_addr(argv[2]);
- if ( the_inet_addr == -1)
+ if ( the_inet_addr == INADDR_NONE)
errx(2, "bogus addr %s", argv[2]);
bcopy(&the_inet_addr,&whoami_arg.client_address.bp_address_u.ip_addr,4);
OpenPOWER on IntegriCloud