summaryrefslogtreecommitdiffstats
path: root/cmd/zdb/zdb.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-03-11 20:53:11 -0700
committerBrian Behlendorf <[email protected]>2009-03-11 20:53:11 -0700
commitc5345441b6aae08cb53aae37bc4b0a85d1a7a723 (patch)
tree162955b7295dac6809625c8e580cf7948e1a28d4 /cmd/zdb/zdb.c
parent3f6e148695c45af8695e8cc6b8a01f29a059aa84 (diff)
parent9915249546c3972325e9a849cefd9983d3a5ce18 (diff)
Merge commit 'refs/top-bases/gcc-branch' into gcc-branch
Diffstat (limited to 'cmd/zdb/zdb.c')
-rw-r--r--cmd/zdb/zdb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index a8813e80f..853875d16 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -818,7 +818,7 @@ dump_dsl_dataset(objset_t *os, uint64_t object, void *data, size_t size)
static void
dump_bplist(objset_t *mos, uint64_t object, char *name)
{
- bplist_t bpl = { 0 };
+ bplist_t bpl;
blkptr_t blk, *bp = &blk;
uint64_t itor = 0;
char bytes[6];
@@ -828,6 +828,7 @@ dump_bplist(objset_t *mos, uint64_t object, char *name)
if (dump_opt['d'] < 3)
return;
+ bzero(&bpl, sizeof(bplist_t));
mutex_init(&bpl.bpl_lock, NULL, MUTEX_DEFAULT, NULL);
VERIFY(0 == bplist_open(&bpl, mos, object));
if (bplist_empty(&bpl)) {
@@ -1568,13 +1569,15 @@ zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, const zbookmark_t *zb,
static int
dump_block_stats(spa_t *spa)
{
- zdb_cb_t zcb = { 0 };
+ zdb_cb_t zcb;
zdb_blkstats_t *zb, *tzb;
uint64_t alloc, space, logalloc;
vdev_t *rvd = spa->spa_root_vdev;
int leaks = 0;
int c, e;
+ bzero(&zcb, sizeof(zdb_cb_t));
+
if (!dump_opt['S']) {
(void) printf("\nTraversing all blocks %s%s%s%s...\n",
(dump_opt['c'] || !dump_opt['L']) ? "to verify " : "",