From 450f2d0b08e73cfb057d0e301a813418b70d64b9 Mon Sep 17 00:00:00 2001 From: Rob N Date: Fri, 8 Dec 2023 03:41:54 +1100 Subject: [PATCH] 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 Reviewed-by: Brian Behlendorf Reviewed-by: Ameer Hamza Signed-off-by: Rob Norris Closes #15650 --- cmd/zpool/zpool_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index c143d63705..cf66953a8c 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);