summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zdb/zdb.c7
-rw-r--r--cmd/ztest/ztest.c3
2 files changed, 7 insertions, 3 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 " : "",
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index fe355815e..0834449c6 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -1932,11 +1932,12 @@ ztest_dmu_write_parallel(ztest_args_t *za)
mutex_t *lp;
char osname[MAXNAMELEN];
char iobuf[SPA_MAXBLOCKSIZE];
- blkptr_t blk = { 0 };
+ blkptr_t blk;
uint64_t blkoff;
zbookmark_t zb;
dmu_tx_t *tx = dmu_tx_create(os);
+ bzero(&blk, sizeof(blkptr_t));
dmu_objset_name(os, osname);
/*