s3-idmap: fix two uninitialized variable warnings in idmap_tdb2.
authorGünther Deschner <gd@samba.org>
Thu, 20 Aug 2009 13:28:19 +0000 (15:28 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 20 Aug 2009 13:29:16 +0000 (15:29 +0200)
Guenther

source3/winbindd/idmap_tdb2.c

index ef365f3ea880ae84c0623063164703b62d613ce3..22aff0d3f74eba96b07f6cacccec67aa06f94017 100644 (file)
@@ -252,7 +252,7 @@ static NTSTATUS idmap_tdb2_allocate_id(struct unixid *xid)
        const char *hwmkey;
        const char *hwmtype;
        uint32_t high_hwm;
-       uint32_t hwm;
+       uint32_t hwm = 0;
        NTSTATUS status;
        struct idmap_tdb2_allocate_id_context state;
 
@@ -469,10 +469,10 @@ static NTSTATUS idmap_tdb2_set_mapping_action(struct db_context *db,
        struct idmap_tdb2_set_mapping_context *state;
        TALLOC_CTX *tmp_ctx = talloc_stackframe();
 
-       DEBUG(10, ("Storing %s <-> %s map\n", state->ksidstr, state->kidstr));
-
        state = (struct idmap_tdb2_set_mapping_context *)private_data;
 
+       DEBUG(10, ("Storing %s <-> %s map\n", state->ksidstr, state->kidstr));
+
        /* check wheter sid mapping is already present in db */
        data = dbwrap_fetch_bystring(db, tmp_ctx, state->ksidstr);
        if (data.dptr) {