]> git.proxmox.com Git - mirror_zfs.git/commitdiff
import: ignore return on hostid lookups
authorRob N <robn@despairlabs.com>
Thu, 7 Dec 2023 16:41:54 +0000 (03:41 +1100)
committerGitHub <noreply@github.com>
Thu, 7 Dec 2023 16:41:54 +0000 (08:41 -0800)
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

cmd/zpool/zpool_main.c

index c143d637059dc1197bdba35bf2e1d8d7fedaee5f..cf66953a8caa28a1cb57127c9b8cfebe96e112ee 100644 (file)
@@ -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);