]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Fix uninit variable in slab reclaim test
authorBrian Behlendorf <behlendo@fedora-17-amd64.(none)>
Wed, 13 Jun 2012 20:43:29 +0000 (13:43 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 13 Jun 2012 23:17:22 +0000 (16:17 -0700)
Gcc version 4.7.0 reports the delta.tv_sec in the slab reclaim test
as potentially unitialized.  In practice this will never occur but
to keep gcc happy we initialize the variable to zero.

Signed-off-by: Brian Behlendorf <behlendo@fedora-17-amd64.(none)>
module/splat/splat-kmem.c

index 8613ddc29d6f7da230a407832e252ef2ea8340c4..284c7c30eb2690c27259387a85745c49733a694d 100644 (file)
@@ -1135,7 +1135,7 @@ splat_kmem_test13(struct file *file, void *arg)
        kmem_cache_data_t *kcd;
        dummy_page_t *dp;
        struct list_head list;
-       struct timespec start, delta;
+       struct timespec start, delta = { 0, 0 };
        int size, count, slabs, fails = 0;
        int i, rc = 0, max_time = 10;