diff options
author | Michael Adam <obnox@samba.org> | 2008-02-22 00:27:00 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-02-22 00:36:20 +0100 |
commit | e3d1f512cf63337ed39942f9ac8e9ee08ee0d7ef (patch) | |
tree | f58b5a5c490230a4e437a32d9ac7545ead170574 /source3 | |
parent | e2ec7931ff157d9468ee31009db1adb0d9acfd6d (diff) | |
download | samba-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')
-rw-r--r-- | source3/lib/replace/getifaddrs.c | 6 |
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); |