Date: Sun, 10 Nov 2019 15:07:36 +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: r354594 - head/stand/libsa/zfs Message-ID: <201911101507.xAAF7aDv062237@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tsoome Date: Sun Nov 10 15:07:36 2019 New Revision: 354594 URL: https://svnweb.freebsd.org/changeset/base/354594 Log: loader: use struct initializer in vdev_probe(). Hopefully it is a bit more clear this way. Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Sun Nov 10 15:03:59 2019 (r354593) +++ head/stand/libsa/zfs/zfsimpl.c Sun Nov 10 15:07:36 2019 (r354594) @@ -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; + vdev_t vtmp = { 0 }; spa_t *spa; vdev_t *vdev, *top_vdev, *pool_vdev; unsigned char *nvlist; @@ -1713,7 +1713,6 @@ 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?201911101507.xAAF7aDv062237>