aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob N <robn@despairlabs.com>2023-12-07 16:41:54 +0000
committerGitHub <noreply@github.com>2023-12-07 16:41:54 +0000
commit450f2d0b08e73cfb057d0e301a813418b70d64b9 (patch)
tree9048c35f77656a2d9218ceb5f5b0fb16172471ad
parentf0cb6482e1fe239c17f64cdb37f205e0e66ac4d4 (diff)
downloadsrc-450f2d0b08e73cfb057d0e301a813418b70d64b9.tar.gz
src-450f2d0b08e73cfb057d0e301a813418b70d64b9.zip
import: ignore return on hostid lookups
Just silencing a warning. Its totally fine for a hostid to not be there. Reported-by: Coverity (CID-1573336) Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ameer Hamza <ahamza@ixsystems.com> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #15650
-rw-r--r--cmd/zpool/zpool_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index c143d637059d..cf66953a8caa 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -3132,7 +3132,8 @@ zfs_force_import_required(nvlist_t *config)
* local hostid.
*/
if (nvlist_lookup_uint64(nvinfo, ZPOOL_CONFIG_HOSTID, &hostid) != 0)
- nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid);
+ (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID,
+ &hostid);
if (state != POOL_STATE_EXPORTED && hostid != get_system_hostid())
return (B_TRUE);