summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1998-03-20 03:04:01 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1998-03-20 03:04:01 +0000
commit8e9939ff84d35694303637183da3fd14dce7d37c (patch)
tree391a5b9d6425b0d28a0d0bd7cccbc557bfed7ba6
parente93592db59a45b754acf3d89c711bcaa2d52ded3 (diff)
Cleaner handling.
-rw-r--r--usr.sbin/amd/amd/wire.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/amd/amd/wire.c b/usr.sbin/amd/amd/wire.c
index 57c4186e816..231dc2c672b 100644
--- a/usr.sbin/amd/amd/wire.c
+++ b/usr.sbin/amd/amd/wire.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)wire.c 8.1 (Berkeley) 6/6/93
- * $Id: wire.c,v 1.3 1998/03/20 02:58:19 angelos Exp $
+ * $Id: wire.c,v 1.4 1998/03/20 03:04:00 angelos Exp $
*/
/*
@@ -136,7 +136,6 @@ char *getwire()
*/
for (cp = buf; cp < cplim; cp += size(ifr)) {
addrlist *al;
- struct sockaddr_in sintmp;
ifr = (struct ifreq *) cp;
if (ifr->ifr_addr.sa_family != AF_INET)
@@ -144,8 +143,6 @@ char *getwire()
else
address = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr;
- sintmp.sin_addr.s_addr = address;
-
/*
* Get interface flags
*/
@@ -164,7 +161,7 @@ char *getwire()
/*
* Get the netmask of this interface
*/
- memcpy(&ifr->ifr_addr, &sintmp, sizeof(sintmp));
+ ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr = address;
if (ioctl(sk, SIOCGIFNETMASK, (caddr_t) ifr) < 0)
continue;