summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-02-22 17:29:05 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-02-22 17:29:05 +0000
commit8ddf0fc0955bdedd8f4fdff69c51e32bde9bef12 (patch)
treef2e9b1a337f8953b94d69b32196f8d3ef78e4c32 /usr.sbin
parenta592cbcd0cf7c1d70d322346995f6262c1a4ba3f (diff)
sorry previous fix against alignment issue was totally broken.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/amd/amd/wire.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/amd/amd/wire.c b/usr.sbin/amd/amd/wire.c
index 95c22e158fe..d4ddd188a75 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.5 2000/02/21 02:03:18 itojun Exp $
+ * $Id: wire.c,v 1.6 2000/02/22 17:29:04 itojun Exp $
*/
/*
@@ -89,7 +89,7 @@ char *getwire()
struct hostent *hp;
struct netent *np;
struct ifconf ifc;
- struct ifreq *ifr;
+ struct ifreq *ifr, ifrpool;
caddr_t cp, cplim;
u_int32_t address, netmask, subnet;
char buf[GFBUFLEN], *s;
@@ -136,7 +136,8 @@ char *getwire()
*/
for (cp = buf; cp < cplim; cp += size(ifr)) {
addrlist *al;
- memcpy(&ifr, cp, sizeof(ifr));
+ memcpy(&ifrpool, cp, sizeof(ifrpool));
+ ifr = &ifrpool;
if (ifr->ifr_addr.sa_family != AF_INET)
continue;