diff options
author | Brian Behlendorf <[email protected]> | 2010-08-26 09:52:41 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-27 15:34:03 -0700 |
commit | 2598c0012dc33496539ce893a0af601c66cbb7e2 (patch) | |
tree | c0523910cfa96a281a85063b113fc5f2bb05e7a2 /cmd/zdb | |
parent | 0bc8fd7884fc603eb7646c43b1fc0b18e37e7d62 (diff) |
Fix gcc missing braces warnings
Resolve compiler warnings concerning missing braces.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'cmd/zdb')
-rw-r--r-- | cmd/zdb/zdb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 11af8c0c3..1a458f604 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -2179,7 +2179,7 @@ count_block_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx) static int dump_block_stats(spa_t *spa) { - zdb_cb_t zcb = { 0 }; + zdb_cb_t zcb; zdb_blkstats_t *zb, *tzb; uint64_t norm_alloc, norm_space, total_alloc, total_found; int flags = TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA | TRAVERSE_HARD; @@ -2201,6 +2201,7 @@ dump_block_stats(spa_t *spa) * it's not part of any space map) is a double allocation, * reference to a freed block, or an unclaimed log block. */ + bzero(&zcb, sizeof(zdb_cb_t)); zdb_leak_init(spa, &zcb); /* @@ -2413,8 +2414,11 @@ dump_simulated_ddt(spa_t *spa) avl_tree_t t; void *cookie = NULL; zdb_ddt_entry_t *zdde; - ddt_histogram_t ddh_total = { 0 }; - ddt_stat_t dds_total = { 0 }; + ddt_histogram_t ddh_total; + ddt_stat_t dds_total; + + bzero(&ddh_total, sizeof (ddt_histogram_t)); + bzero(&dds_total, sizeof (ddt_stat_t)); avl_create(&t, ddt_entry_compare, sizeof (zdb_ddt_entry_t), offsetof(zdb_ddt_entry_t, zdde_node)); |