summaryrefslogtreecommitdiffstats
path: root/usr.bin/ypwhich
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-02-27 14:32:43 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-02-27 14:32:43 +0000
commit921c81b2d4c61e40a99bc3e7e7dc9f617cad70bd (patch)
treeb7e2daf25cbd7763dc64ae7a261c349749834643 /usr.bin/ypwhich
parent4a97e7fa66a711f05d1a6bdfd07ca002f1c096cd (diff)
downloadFreeBSD-src-921c81b2d4c61e40a99bc3e7e7dc9f617cad70bd.zip
FreeBSD-src-921c81b2d4c61e40a99bc3e7e7dc9f617cad70bd.tar.gz
1) Remove blank line between include of sys/cdefs.h and __FBSDID
2) compare return value of inet_addr to INADDR_NONE rather than -1.
Diffstat (limited to 'usr.bin/ypwhich')
-rw-r--r--usr.bin/ypwhich/ypwhich.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c
index 9137c99..1c6f36c 100644
--- a/usr.bin/ypwhich/ypwhich.c
+++ b/usr.bin/ypwhich/ypwhich.c
@@ -28,7 +28,6 @@
*/
#include <sys/cdefs.h>
-
__FBSDID("$FreeBSD$");
#include <sys/param.h>
@@ -185,7 +184,7 @@ main(int argc, char *argv[])
case 1:
bzero(&lsin, sizeof lsin);
lsin.sin_family = AF_INET;
- if ((lsin.sin_addr.s_addr = inet_addr(argv[optind])) == -1) {
+ if ((lsin.sin_addr.s_addr = inet_addr(argv[optind])) == INADDR_NONE) {
hent = gethostbyname(argv[optind]);
if (!hent)
errx(ERR_NOSUCHHOST, "host %s unknown", argv[optind]);
OpenPOWER on IntegriCloud