summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorderaadt <>1998-03-18 00:15:25 +0000
committerderaadt <>1998-03-18 00:15:25 +0000
commit1b87c4e2550acaf4647f9cecfd5a57990817788e (patch)
treea62abb961074dbf09b4466b9b05e7bd2a6b59373 /src
parenteb844f9c8e80d5530f7c9ef5fb50b8243097f8d7 (diff)
downloadopenbsd-1b87c4e2550acaf4647f9cecfd5a57990817788e.tar.gz
openbsd-1b87c4e2550acaf4647f9cecfd5a57990817788e.tar.bz2
openbsd-1b87c4e2550acaf4647f9cecfd5a57990817788e.zip
Todd does not test YP code; felix@mamba.pond.sub.org
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/net/ethers.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libc/net/ethers.c b/src/lib/libc/net/ethers.c
index 2dec56cf39..262110aacb 100644
--- a/src/lib/libc/net/ethers.c
+++ b/src/lib/libc/net/ethers.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ethers.c,v 1.7 1998/03/17 06:22:00 millert Exp $ */ 1/* $OpenBSD: ethers.c,v 1.8 1998/03/18 00:15:25 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> 4 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#if defined(LIBC_SCCS) && !defined(lint) 39#if defined(LIBC_SCCS) && !defined(lint)
40static char rcsid[] = "$OpenBSD: ethers.c,v 1.7 1998/03/17 06:22:00 millert Exp $"; 40static char rcsid[] = "$OpenBSD: ethers.c,v 1.8 1998/03/18 00:15:25 deraadt Exp $";
41#endif /* LIBC_SCCS and not lint */ 41#endif /* LIBC_SCCS and not lint */
42 42
43#include <sys/types.h> 43#include <sys/types.h>
@@ -125,6 +125,10 @@ ether_ntohost(hostname, e)
125 char buf[BUFSIZ+1], *p; 125 char buf[BUFSIZ+1], *p;
126 size_t len; 126 size_t len;
127 struct ether_addr try; 127 struct ether_addr try;
128#ifdef YP
129 char trybuf[sizeof("xx:xx:xx:xx:xx:xx")];
130 int trylen;
131#endif
128 132
129 if (e->ether_addr_octet[0] > 0xFF || e->ether_addr_octet[1] > 0xFF || 133 if (e->ether_addr_octet[0] > 0xFF || e->ether_addr_octet[1] > 0xFF ||
130 e->ether_addr_octet[2] > 0xFF || e->ether_addr_octet[3] > 0xFF || 134 e->ether_addr_octet[2] > 0xFF || e->ether_addr_octet[3] > 0xFF ||
@@ -134,9 +138,6 @@ ether_ntohost(hostname, e)
134 } 138 }
135 139
136#ifdef YP 140#ifdef YP
137 char trybuf[sizeof("xx:xx:xx:xx:xx:xx")];
138 int trylen;
139
140 sprintf(trybuf, "%x:%x:%x:%x:%x:%x", 141 sprintf(trybuf, "%x:%x:%x:%x:%x:%x",
141 e->ether_addr_octet[0], e->ether_addr_octet[1], 142 e->ether_addr_octet[0], e->ether_addr_octet[1],
142 e->ether_addr_octet[2], e->ether_addr_octet[3], 143 e->ether_addr_octet[2], e->ether_addr_octet[3],