summaryrefslogtreecommitdiff
path: root/usr.sbin/ypserv/stdhosts
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>2003-02-11 01:08:28 +0000
committerMats O Jansson <maja@cvs.openbsd.org>2003-02-11 01:08:28 +0000
commitbe570879b32ff14ff99f617055bb1f84046a522c (patch)
tree71654294e01f60a6d8d4b648ef9ccb7d39959028 /usr.sbin/ypserv/stdhosts
parent4a2755f8fb5eb589be689a8ab3111a79fb0bee30 (diff)
Fix bug 3088 in a different way. Reported by bob at cemetery dot homeunix
dot org. -moj ok deraadt@
Diffstat (limited to 'usr.sbin/ypserv/stdhosts')
-rw-r--r--usr.sbin/ypserv/stdhosts/stdhosts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ypserv/stdhosts/stdhosts.c b/usr.sbin/ypserv/stdhosts/stdhosts.c
index 95082b861c3..856b81df94c 100644
--- a/usr.sbin/ypserv/stdhosts/stdhosts.c
+++ b/usr.sbin/ypserv/stdhosts/stdhosts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdhosts.c,v 1.8 2002/07/19 02:38:40 deraadt Exp $ */
+/* $OpenBSD: stdhosts.c,v 1.9 2003/02/11 01:08:27 maja Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: stdhosts.c,v 1.8 2002/07/19 02:38:40 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: stdhosts.c,v 1.9 2003/02/11 01:08:27 maja Exp $";
#endif
#include <sys/types.h>
@@ -127,8 +127,8 @@ main(int argc, char *argv[])
while (*p != '\0') /* find end of string */
p++;
- (void)inet_aton(k, &host_addr);
- printf("%s %s\n", inet_ntoa(host_addr),v);
+ if (inet_aton(k, &host_addr))
+ printf("%s %s\n", inet_ntoa(host_addr),v);
}
return(0);
}