Add missing initalizations of lastif in rep_getifaddr implementations.
authorMichael Adam <obnox@samba.org>
Thu, 21 Feb 2008 23:24:11 +0000 (00:24 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 21 Feb 2008 23:40:33 +0000 (00:40 +0100)
Michael
(cherry picked from commit 65710e752f72070cb911867ff9f31f91904ca5c0)

source/lib/replace/getifaddrs.c

index f12062bd8ec75a0929af1303542c2537f98afd4e..60049caa99050f878ac5b4610b1d6fa0c282d52f 100644 (file)
@@ -84,7 +84,8 @@ int rep_getifaddrs(struct ifaddrs **ifap)
        struct in_addr ipaddr;
        struct in_addr nmask;
        char *iname;
-       struct ifaddrs *curif, *lastif;
+       struct ifaddrs *curif;
+       struct ifaddrs *lastif = NULL;
 
        *ifap = NULL;
 
@@ -168,7 +169,8 @@ int rep_getifaddrs(struct ifaddrs **ifap)
        struct in_addr ipaddr;
        struct in_addr nmask;
        char *iname;
-       struct ifaddrs *curif, *lastif;
+       struct ifaddrs *curif;
+       struct ifaddrs *lastif = NULL;
 
        *ifap = NULL;
 
@@ -268,7 +270,8 @@ int rep_getifaddrs(struct ifaddrs **ifap)
        struct in_addr ipaddr;
        struct in_addr nmask;
        char *iname;
-       struct ifaddrs *curif, *lastif;
+       struct ifaddrs *curif;
+       struct ifaddrs *lastif = NULL;
 
        *ifap = NULL;