diff options
author | Reno Reckling <[email protected]> | 2023-02-03 00:22:12 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-02-02 15:22:12 -0800 |
commit | 6017fd9377b217481097dda1206132ec81fcc8ef (patch) | |
tree | 4dd9ac93dec728791dcb809055a2128acb5a633f /lib | |
parent | 90f4e01f8ab89edc39bfa227032acb66ae511988 (diff) |
Fix variable shadowing in libzfs_mount
We accidentally reused variable name "i" for inner and outer loops.
Reviewed-by: Rich Ercolani <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Reno Reckling <[email protected]>
Closes #14452
Closes #14445
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_mount.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libzfs/libzfs_mount.c b/lib/libzfs/libzfs_mount.c index 57737bc6c..8612e082b 100644 --- a/lib/libzfs/libzfs_mount.c +++ b/lib/libzfs/libzfs_mount.c @@ -1422,10 +1422,10 @@ zpool_disable_datasets(zpool_handle_t *zhp, boolean_t force) * Walk through and first unshare everything. */ for (i = 0; i < used; i++) { - for (enum sa_protocol i = 0; i < SA_PROTOCOL_COUNT; ++i) { - if (sa_is_shared(sets[i].mountpoint, i) && + for (enum sa_protocol p = 0; p < SA_PROTOCOL_COUNT; ++p) { + if (sa_is_shared(sets[i].mountpoint, p) && unshare_one(hdl, sets[i].mountpoint, - sets[i].mountpoint, i) != 0) + sets[i].mountpoint, p) != 0) goto out; } } |