Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2018 21:38:06 +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: r337874 - head/stand/libsa/zfs
Message-ID:  <201808152138.w7FLc6aK092386@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Wed Aug 15 21:38:06 2018
New Revision: 337874
URL: https://svnweb.freebsd.org/changeset/base/337874

Log:
  libsa: zfs_probe() needs to set spa to NULL
  
  Silence the warning about possibly uninitialized use of spa.

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

Modified: head/stand/libsa/zfs/zfs.c
==============================================================================
--- head/stand/libsa/zfs/zfs.c	Wed Aug 15 21:24:05 2018	(r337873)
+++ head/stand/libsa/zfs/zfs.c	Wed Aug 15 21:38:06 2018	(r337874)
@@ -467,6 +467,7 @@ zfs_probe(int fd, uint64_t *pool_guid)
 	spa_t *spa;
 	int ret;
 
+	spa = NULL;
 	ret = vdev_probe(vdev_read, (void *)(uintptr_t)fd, &spa);
 	if (ret == 0 && pool_guid != NULL)
 		*pool_guid = spa->spa_guid;



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