r10483: fixed some uninitialised variables warnings
authorAndrew Tridgell <tridge@samba.org>
Sat, 24 Sep 2005 23:52:30 +0000 (23:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:38:53 +0000 (13:38 -0500)
(This used to be commit 315653cf1ecc11c435ee35b20e6cf9c73a67fa68)

source4/lib/tdb/common/freelist.c
source4/lib/tdb/common/transaction.c

index 9707295ec3b48c746e56e5f8c1c242cd1c153199..3483751164768243f308813f761ab5816a98a088 100644 (file)
@@ -277,6 +277,8 @@ tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_st
                goto fail;
 
        bestfit.rec_ptr = 0;
+       bestfit.last_ptr = 0;
+       bestfit.rec_len = 0;
 
        /* 
           this is a best fit allocation strategy. Originally we used
index fdcba110c20ebc96b3c18b450e75dc17abe5ba79..cf0f378dcedb36fc76e87c6b3ef5432c2ace76f0 100644 (file)
@@ -734,7 +734,7 @@ static int transaction_setup_recovery(struct tdb_context *tdb,
 int tdb_transaction_commit(struct tdb_context *tdb)
 {      
        const struct tdb_methods *methods;
-       tdb_off_t magic_offset;
+       tdb_off_t magic_offset = 0;
        u32 zero = 0;
 
        if (tdb->transaction == NULL) {