]> git.ozlabs.org Git - ccan/commitdiff
stringmap: fail path can print uninitialized var in test.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 4 Aug 2009 02:28:22 +0000 (11:58 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 4 Aug 2009 02:28:22 +0000 (11:58 +0930)
ccan/stringmap/test/run.c

index 52309c2601d863deef142151c6781f116a77bec2..0d4db56734c19c14f48feff643187d90ba8d7421 100644 (file)
@@ -243,7 +243,7 @@ static int test_stringmap(size_t count, FILE *out) {
        struct test_entry *entries = block_pool_alloc(bp, sizeof(*entries) * count);
        struct test_entry *i, *e = entries+count, *o;
        char *value_base = block_pool_alloc(bp, count), *value = value_base;
        struct test_entry *entries = block_pool_alloc(bp, sizeof(*entries) * count);
        struct test_entry *i, *e = entries+count, *o;
        char *value_base = block_pool_alloc(bp, count), *value = value_base;
-       size_t unique_count;
+       size_t unique_count = 0;
        
        //we use value to track whether an entry has been added or not
        memset(value, 0, count);
        
        //we use value to track whether an entry has been added or not
        memset(value, 0, count);