Fix "might be used uninitialized" warnings.
authorJeremy Allison <jra@samba.org>
Fri, 8 Aug 2008 00:49:19 +0000 (17:49 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 8 Aug 2008 00:49:19 +0000 (17:49 -0700)
Jeremy.
(This used to be commit 5abd12eec1c9b6d30af5ec1ba16c0922e78d5bea)

source3/libnet/libnet_dssync.c
source3/libnet/libnet_keytab.c

index 684a2cc63bfd22a95c263fd8232130d6adc123e2..bae03effed6e57ffe250892eaea4ed5b703ae7fd 100644 (file)
@@ -504,8 +504,8 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx,
        }
 
        for (y=0, last_query = false; !last_query; y++) {
-               struct drsuapi_DsReplicaObjectListItemEx *first_object;
-               struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr;
+               struct drsuapi_DsReplicaObjectListItemEx *first_object = NULL;
+               struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr = NULL;
 
                if (level == 8) {
                        DEBUG(1,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
@@ -634,7 +634,7 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx,
 {
        NTSTATUS status;
 
-       int32_t level;
+       int32_t level = 0;
        union drsuapi_DsGetNCChangesRequest req;
        struct replUpToDateVectorBlob *old_utdv = NULL;
        struct replUpToDateVectorBlob *pnew_utdv = NULL;
index 836cf6ed23459fb4a1483f89fb971f85f51fea79..6447183958fdd45c1de1e4fd874dae5669dd08c1 100644 (file)
@@ -314,6 +314,7 @@ krb5_error_code libnet_keytab_add(struct libnet_keytab_context *ctx)
                struct libnet_keytab_entry *entry = &ctx->entries[i];
                krb5_data password;
 
+               ZERO_STRUCT(password);
                password.data = (char *)entry->password.data;
                password.length = entry->password.length;