summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/common_source
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-07-19 07:11:41 +0000
committerderaadt <deraadt@openbsd.org>1997-07-19 07:11:41 +0000
commit705d4ab54a25e51d3a8fc6fe2284953e7ac227ca (patch)
tree5b48e827492c1d01c9cefda20ffc1b48b24523ab /usr.sbin/lpr/common_source
parentinclude new dirs. remove bogus trailer. (diff)
downloadwireguard-openbsd-705d4ab54a25e51d3a8fc6fe2284953e7ac227ca.tar.xz
wireguard-openbsd-705d4ab54a25e51d3a8fc6fe2284953e7ac227ca.zip
Wall cleanup; people running lpd should test!
Diffstat (limited to 'usr.sbin/lpr/common_source')
-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);