aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bootparamd
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2013-10-15 07:37:30 +0000
committerKevin Lo <kevlo@FreeBSD.org>2013-10-15 07:37:30 +0000
commit482d8831004954a9c2915189a6a03c5e41bdfc86 (patch)
treec4d4787170d251b8a1370041f91909fb34d82a1f /usr.sbin/bootparamd
parentb298a86678c4b8e96b5c20f3ed57b508ae2e1df4 (diff)
downloadsrc-482d8831004954a9c2915189a6a03c5e41bdfc86.tar.gz
src-482d8831004954a9c2915189a6a03c5e41bdfc86.zip
Use INADDR_NONE instead of -1 to check inet_addr() result.
Reviewed by: glebius
Notes
Notes: svn path=/head/; revision=256506
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 8c93c1f8e379..85a1fca429a8 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 a0a4ef62f824..7c32fee75f44 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);