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:40:53 +0100 |
commit | c2f92013c3304bf49622f7e0d5658f768898a4f1 (patch) | |
tree | 4908f0c456ecc69bf0012979a104d39940622157 /source4/lib/replace | |
parent | f86ee1f3c6398cdc2320c968ade7058180804ee4 (diff) | |
download | samba-c2f92013c3304bf49622f7e0d5658f768898a4f1.tar.gz samba-c2f92013c3304bf49622f7e0d5658f768898a4f1.tar.bz2 samba-c2f92013c3304bf49622f7e0d5658f768898a4f1.zip |
Fix linked list of ifaddrs in implementations of rep_getifaddrs.
Produce proper list instead of one-node-loop.
Michael
(cherry picked from commit ec9f4f5066ba7a8bf3af931fd4969590140c0b2b)
(This used to be commit 744d5ba7adab65a9774a18eb42b7090f49e423f2)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r-- | source4/lib/replace/getifaddrs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/replace/getifaddrs.c b/source4/lib/replace/getifaddrs.c index 60049caa99..37cd950e09 100644 --- a/source4/lib/replace/getifaddrs.c +++ b/source4/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); |