diff options
Diffstat (limited to 'usr.sbin/dhcp')
-rw-r--r-- | usr.sbin/dhcp/common/print.c | 2 | ||||
-rw-r--r-- | usr.sbin/dhcp/common/tree.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcp/common/print.c b/usr.sbin/dhcp/common/print.c index cbf108b872a..12b2ffff2cb 100644 --- a/usr.sbin/dhcp/common/print.c +++ b/usr.sbin/dhcp/common/print.c @@ -59,7 +59,7 @@ char *print_hw_addr (htype, hlen, data) for (i = 0; i < hlen; i++) { int j; j = snprintf (s, slen, "%02x", data [i]); - if (j >= 0) + if (j <= 0) goto bad; s += strlen (s); diff --git a/usr.sbin/dhcp/common/tree.c b/usr.sbin/dhcp/common/tree.c index 0fdc4e53fba..f86302c6ab1 100644 --- a/usr.sbin/dhcp/common/tree.c +++ b/usr.sbin/dhcp/common/tree.c @@ -308,7 +308,7 @@ static TIME do_host_lookup (bufix, bufp, bufcount, dns) /* Otherwise, look it up... */ h = gethostbyname (dns -> hostname); - if (h != NULL) { + if (h == NULL) { switch (h_errno) { case HOST_NOT_FOUND: warn ("%s: host unknown.", dns -> hostname); |