Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2019 10:02:39 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354635 - head/stand/libsa/zfs
Message-ID:  <201911121002.xACA2d3h002264@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Tue Nov 12 10:02:39 2019
New Revision: 354635
URL: https://svnweb.freebsd.org/changeset/base/354635

Log:
  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.

Modified:
  head/stand/libsa/zfs/zfsimpl.c

Modified: head/stand/libsa/zfs/zfsimpl.c
==============================================================================
--- head/stand/libsa/zfs/zfsimpl.c	Tue Nov 12 09:54:48 2019	(r354634)
+++ head/stand/libsa/zfs/zfsimpl.c	Tue Nov 12 10:02:39 2019	(r354635)
@@ -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, s
 	 * 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),



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911121002.xACA2d3h002264>