Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/amd/libamu previous fix against alignment issue was...
details: https://anonhg.NetBSD.org/src/rev/7eeacdc5d090
branches: trunk
changeset: 482828:7eeacdc5d090
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Feb 22 17:30:17 2000 +0000
description:
previous fix against alignment issue was totally broken.
hope this one is okay.
diffstat:
usr.sbin/amd/libamu/wire.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 0740f1d4d828 -r 7eeacdc5d090 usr.sbin/amd/libamu/wire.c
--- a/usr.sbin/amd/libamu/wire.c Tue Feb 22 16:36:29 2000 +0000
+++ b/usr.sbin/amd/libamu/wire.c Tue Feb 22 17:30:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wire.c,v 1.2 2000/02/21 02:04:12 itojun Exp $ */
+/* $NetBSD: wire.c,v 1.3 2000/02/22 17:30:17 itojun Exp $ */
/*
* Copyright (c) 1997-1999 Erez Zadok
@@ -368,7 +368,7 @@
getwire(char **name1, char **number1)
{
struct ifconf ifc;
- struct ifreq *ifr;
+ struct ifreq *ifr, ifrpool;
caddr_t cp, cplim;
int fd = -1;
u_long address;
@@ -423,7 +423,8 @@
* Scan the list looking for a suitable interface
*/
for (cp = buf; cp < cplim; cp += SIZE(ifr)) {
- memcpy(&ifr, cp, sizeof(ifr));
+ memcpy(&ifrpool, cp, sizeof(ifrpool));
+ ifr = &ifrpool;
if (ifr->ifr_addr.sa_family != AF_INET)
continue;
Home |
Main Index |
Thread Index |
Old Index