nwrap: move var into scope in nwrap_add_hname()
authorMichael Adam <obnox@samba.org>
Mon, 9 Nov 2015 16:41:43 +0000 (17:41 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 12 Nov 2015 10:42:32 +0000 (11:42 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
src/nss_wrapper.c

index 0837c7cd44f6515bd76e5b5585203c6a92448a60..c114ea01b0590150b33991db17710d38b8938e7f 100644 (file)
@@ -2629,7 +2629,6 @@ static bool nwrap_add_hname(struct nwrap_entdata *const ed)
        char *const h_name = (char *const)(ed->ht.h_name);
        ENTRY e;
        ENTRY *p;
-       char *h_name_alias;
        unsigned i;
 
        /* Maybe it's little bit late ... */
@@ -2664,6 +2663,8 @@ static bool nwrap_add_hname(struct nwrap_entdata *const ed)
 
        /* Itemize aliases */
        for (i = 0; ed->ht.h_aliases[i] != NULL; ++i) {
+               char *h_name_alias;
+
                h_name_alias = ed->ht.h_aliases[i];
                assert(h_name_alias != NULL);