diff options
author | David Malone <dwmalone@FreeBSD.org> | 2002-02-27 14:32:43 +0000 |
---|---|---|
committer | David Malone <dwmalone@FreeBSD.org> | 2002-02-27 14:32:43 +0000 |
commit | 29da6db8e231c4ad2fded80a23376cfbe8c15c42 (patch) | |
tree | b7e2daf25cbd7763dc64ae7a261c349749834643 /usr.bin/ypwhich | |
parent | 6b5f8759ff8bf1484d57ad5fa8da28c506317763 (diff) | |
download | src-29da6db8e231c4ad2fded80a23376cfbe8c15c42.tar.gz src-29da6db8e231c4ad2fded80a23376cfbe8c15c42.zip |
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.
Notes
Notes:
svn path=/head/; revision=91377
Diffstat (limited to 'usr.bin/ypwhich')
-rw-r--r-- | usr.bin/ypwhich/ypwhich.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c index 9137c99e1bc4..1c6f36c26c26 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]); |