diff options
author | Brooks Davis <[email protected]> | 2022-10-27 23:25:42 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-11-03 09:52:19 -0700 |
commit | 877790001e74b6c3b2955e4b7a8c685385e77654 (patch) | |
tree | c5bd48a669cc00143bb04ebbb4e834857b33cfb6 /lib/libzfs/libzfs_dataset.c | |
parent | 250b2bac78102f707dc105450f25d91e5fab481e (diff) |
recvd_props_mode: use a uintptr_t to stash nvlists
Avoid assuming than a uint64_t can hold a pointer.
Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Brooks Davis <[email protected]>
Closes #14131
Diffstat (limited to 'lib/libzfs/libzfs_dataset.c')
-rw-r--r-- | lib/libzfs/libzfs_dataset.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index f8a61c642..87bc4ea66 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -2087,16 +2087,16 @@ zfs_is_recvd_props_mode(zfs_handle_t *zhp) } static void -zfs_set_recvd_props_mode(zfs_handle_t *zhp, uint64_t *cookie) +zfs_set_recvd_props_mode(zfs_handle_t *zhp, uintptr_t *cookie) { - *cookie = (uint64_t)(uintptr_t)zhp->zfs_props; + *cookie = (uintptr_t)zhp->zfs_props; zhp->zfs_props = zhp->zfs_recvd_props; } static void -zfs_unset_recvd_props_mode(zfs_handle_t *zhp, uint64_t *cookie) +zfs_unset_recvd_props_mode(zfs_handle_t *zhp, uintptr_t *cookie) { - zhp->zfs_props = (nvlist_t *)(uintptr_t)*cookie; + zhp->zfs_props = (nvlist_t *)*cookie; *cookie = 0; } @@ -2373,7 +2373,7 @@ zfs_prop_get_recvd(zfs_handle_t *zhp, const char *propname, char *propbuf, prop = zfs_name_to_prop(propname); if (prop != ZPROP_USERPROP) { - uint64_t cookie; + uintptr_t cookie; if (!nvlist_exists(zhp->zfs_recvd_props, propname)) return (-1); zfs_set_recvd_props_mode(zhp, &cookie); |