Skip to content

Commit

Permalink
Cleanup: Delete unnecessary pointer check from vdev_to_nvlist_iter()
Browse files Browse the repository at this point in the history
This confused Clang's static analyzer, making it think there was a
possible NULL pointer dereference. There is no NULL pointer dereference.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes openzfs#14042
  • Loading branch information
ryao authored and andrewc12 committed Oct 21, 2022
1 parent ad624c5 commit 85c6641
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libzfs/libzfs_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2677,7 +2677,7 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist_t *search, boolean_t *avail_spare,
if (zfs_strcmp_pathname(srchval, val, wholedisk) == 0)
return (nv);

} else if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) {
} else if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0) {
char *type, *idx, *end, *p;
uint64_t id, vdev_id;

Expand Down

0 comments on commit 85c6641

Please sign in to comment.