summaryrefslogtreecommitdiff
path: root/source4/lib
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:40:53 +0100
commitc2f92013c3304bf49622f7e0d5658f768898a4f1 (patch)
tree4908f0c456ecc69bf0012979a104d39940622157 /source4/lib
parentf86ee1f3c6398cdc2320c968ade7058180804ee4 (diff)
downloadsamba-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')
-rw-r--r--source4/lib/replace/getifaddrs.c6
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);