aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zcp_iter.c
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2023-03-11 13:39:24 -0500
committerBrian Behlendorf <[email protected]>2023-03-14 15:25:50 -0700
commitd1807f168edd09ca26a5a0c6b570686b982808ad (patch)
treedb5bfd360991fa3528fe688247eb289ef1d8b859 /module/zfs/zcp_iter.c
parent50f6934b9c1f4aa583592e8a969b934440a44c64 (diff)
nvpair: Constify string functions
After addressing coverity complaints involving `nvpair_name()`, the compiler started complaining about dropping const. This lead to a rabbit hole where not only `nvpair_name()` needed to be constified, but also `nvpair_value_string()`, `fnvpair_value_string()` and a few other static functions, plus variable pointers throughout the code. The result became a fairly big change, so it has been split out into its own patch. Reviewed-by: Tino Reichardt <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #14612
Diffstat (limited to 'module/zfs/zcp_iter.c')
-rw-r--r--module/zfs/zcp_iter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zcp_iter.c b/module/zfs/zcp_iter.c
index ed575738f..2da0bf974 100644
--- a/module/zfs/zcp_iter.c
+++ b/module/zfs/zcp_iter.c
@@ -333,7 +333,7 @@ zcp_user_props_list_gc(lua_State *state)
static int
zcp_user_props_iter(lua_State *state)
{
- char *source, *val;
+ const char *source, *val;
nvlist_t *nvprop;
nvlist_t **props = lua_touserdata(state, lua_upvalueindex(1));
nvpair_t *pair = lua_touserdata(state, lua_upvalueindex(2));