diff options
author | 2000-02-22 17:29:04 +0000 | |
---|---|---|
committer | 2000-02-22 17:29:04 +0000 | |
commit | 050ec43edf257a504bd322f8f165eabc1ac8ff10 (patch) | |
tree | cc8995e287fc8a86e1511c2b8c56f1922dcd893a | |
parent | void* -> unsigned char*, ok niels@ (diff) | |
download | wireguard-openbsd-050ec43edf257a504bd322f8f165eabc1ac8ff10.tar.xz wireguard-openbsd-050ec43edf257a504bd322f8f165eabc1ac8ff10.zip |
sorry previous fix against alignment issue was totally broken.
-rw-r--r-- | usr.sbin/amd/amd/wire.c | 7 |
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; |