mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
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 <milky-zfs@mcmilk.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14612
This commit is contained in:
committed by
Brian Behlendorf
parent
50f6934b9c
commit
d1807f168e
@@ -391,7 +391,7 @@ get_special_prop(lua_State *state, dsl_dataset_t *ds, const char *dsname,
|
||||
dsl_dataset_crypt_stats(ds, nvl);
|
||||
if (nvlist_lookup_nvlist(nvl, zfs_prop_to_name(zfs_prop),
|
||||
&propval) == 0) {
|
||||
char *source;
|
||||
const char *source;
|
||||
|
||||
(void) nvlist_lookup_uint64(propval, ZPROP_VALUE,
|
||||
&numval);
|
||||
|
||||
Reference in New Issue
Block a user