summaryrefslogtreecommitdiff
path: root/source3/lib/replace
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-02-22 00:27:00 +0100
committerMichael Adam <obnox@samba.org>2008-02-22 00:36:20 +0100
commite3d1f512cf63337ed39942f9ac8e9ee08ee0d7ef (patch)
treef58b5a5c490230a4e437a32d9ac7545ead170574 /source3/lib/replace
parente2ec7931ff157d9468ee31009db1adb0d9acfd6d (diff)
downloadsamba-e3d1f512cf63337ed39942f9ac8e9ee08ee0d7ef.tar.gz
samba-e3d1f512cf63337ed39942f9ac8e9ee08ee0d7ef.tar.bz2
samba-e3d1f512cf63337ed39942f9ac8e9ee08ee0d7ef.zip
Fix linked list of ifaddrs in implementations of rep_getifaddrs.
Produce proper list instead of one-node-loop. Michael (This used to be commit ec9f4f5066ba7a8bf3af931fd4969590140c0b2b)
Diffstat (limited to 'source3/lib/replace')
-rw-r--r--source3/lib/replace/getifaddrs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/replace/getifaddrs.c b/source3/lib/replace/getifaddrs.c
index 60049caa99..37cd950e09 100644
--- a/source3/lib/replace/getifaddrs.c
+++ b/source3/lib/replace/getifaddrs.c
@@ -115,7 +115,7 @@ int rep_getifaddrs(struct ifaddrs **ifap)
if (lastif == NULL) {
*ifap = curif;
} else {
- lastif->ifa_next = (*ifap);
+ lastif->ifa_next = curif;
}
curif->ifa_name = strdup(ifr[i].ifr_name);
@@ -208,7 +208,7 @@ int rep_getifaddrs(struct ifaddrs **ifap)
if (lastif == NULL) {
*ifap = curif;
} else {
- lastif->ifa_next = (*ifap);
+ lastif->ifa_next = curif;
}
strioctl.ic_cmd = SIOCGIFFLAGS;
@@ -306,7 +306,7 @@ int rep_getifaddrs(struct ifaddrs **ifap)
if (lastif == NULL) {
*ifap = curif;
} else {
- lastif->ifa_next = (*ifap);
+ lastif->ifa_next = curif;
}
curif->ifa_name = strdup(ifr->ifr_name);