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),
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to