From 9e04f95b0e98a309be7b29eb6a020abdd08dd29f Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 18 Mar 1998 00:15:26 +0000 Subject: Todd does not test YP code; felix@mamba.pond.sub.org --- lib/libc/net/ethers.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/net/ethers.c b/lib/libc/net/ethers.c index 2dec56cf39e..262110aacb6 100644 --- a/lib/libc/net/ethers.c +++ b/lib/libc/net/ethers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ethers.c,v 1.7 1998/03/17 06:22:00 millert Exp $ */ +/* $OpenBSD: ethers.c,v 1.8 1998/03/18 00:15:25 deraadt Exp $ */ /* * Copyright (c) 1998 Todd C. Miller @@ -37,7 +37,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ethers.c,v 1.7 1998/03/17 06:22:00 millert Exp $"; +static char rcsid[] = "$OpenBSD: ethers.c,v 1.8 1998/03/18 00:15:25 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -125,6 +125,10 @@ ether_ntohost(hostname, e) char buf[BUFSIZ+1], *p; size_t len; struct ether_addr try; +#ifdef YP + char trybuf[sizeof("xx:xx:xx:xx:xx:xx")]; + int trylen; +#endif if (e->ether_addr_octet[0] > 0xFF || e->ether_addr_octet[1] > 0xFF || e->ether_addr_octet[2] > 0xFF || e->ether_addr_octet[3] > 0xFF || @@ -134,9 +138,6 @@ ether_ntohost(hostname, e) } #ifdef YP - char trybuf[sizeof("xx:xx:xx:xx:xx:xx")]; - int trylen; - sprintf(trybuf, "%x:%x:%x:%x:%x:%x", e->ether_addr_octet[0], e->ether_addr_octet[1], e->ether_addr_octet[2], e->ether_addr_octet[3], -- cgit v1.2.3