From c082b391b0e24ce69b33482cf77ff13bd1fefe29 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 12 Nov 2019 10:02:39 +0000 Subject: [PATCH] reverting r354594 In our case the structure is more complex and simple static initializer will upset compiler diagnostics - using memset is still better than building more complext initializer. --- stand/libsa/zfs/zfsimpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index ea3adbe46ee..7cd76c6461d 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -1697,7 +1697,7 @@ vdev_uberblock_load(vdev_t *vd, uberblock_t *ub) static int vdev_probe(vdev_phys_read_t *_read, void *read_priv, spa_t **spap) { - vdev_t vtmp = { 0 }; + vdev_t vtmp; spa_t *spa; vdev_t *vdev, *top_vdev, *pool_vdev; unsigned char *nvlist; @@ -1713,6 +1713,7 @@ vdev_probe(vdev_phys_read_t *_read, void *read_priv, spa_t **spap) * Load the vdev label and figure out which * uberblock is most current. */ + memset(&vtmp, 0, sizeof(vtmp)); vtmp.v_phys_read = _read; vtmp.v_read_priv = read_priv; vtmp.v_psize = P2ALIGN(ldi_get_size(read_priv),