summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr/common_source/common.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-07-19 07:11:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-07-19 07:11:45 +0000
commit24d1b49eff196da594b7cfa86030a0aee2e2674f (patch)
tree62ad2c80e740d2e0d0227bff17593acecee09f3c /usr.sbin/lpr/common_source/common.c
parentec8ba5eca4607d8ea991d4fdd915bb5dcec4cde7 (diff)
Wall cleanup; people running lpd should test!
Diffstat (limited to 'usr.sbin/lpr/common_source/common.c')
-rw-r--r--usr.sbin/lpr/common_source/common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c
index 5f97d093306..9e3f963db50 100644
--- a/usr.sbin/lpr/common_source/common.c
+++ b/usr.sbin/lpr/common_source/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.4 1997/01/17 16:11:35 millert Exp $ */
+/* $OpenBSD: common.c,v 1.5 1997/07/19 07:11:41 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: common.c,v 1.4 1997/01/17 16:11:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: common.c,v 1.5 1997/07/19 07:11:41 deraadt Exp $";
#endif
#endif /* not lint */
@@ -52,6 +52,7 @@ static char rcsid[] = "$OpenBSD: common.c,v 1.4 1997/01/17 16:11:35 millert Exp
#include <sys/socket.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <netdb.h>
#include <dirent.h>
@@ -145,8 +146,7 @@ getport(rhost, rport)
if (rhost == NULL)
fatal("no remote host to connect to");
bzero((char *)&sin, sizeof(sin));
- sin.sin_addr.s_addr = inet_addr(rhost);
- if (sin.sin_addr.s_addr != INADDR_NONE)
+ if (inet_aton(rhost, &sin.sin_addr) != -1)
sin.sin_family = AF_INET;
else {
hp = gethostbyname(rhost);