diff options
author | Richard Yao <[email protected]> | 2023-03-11 13:39:24 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2023-03-14 15:25:50 -0700 |
commit | d1807f168edd09ca26a5a0c6b570686b982808ad (patch) | |
tree | db5bfd360991fa3528fe688247eb289ef1d8b859 /module/zfs/spa_misc.c | |
parent | 50f6934b9c1f4aa583592e8a969b934440a44c64 (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/spa_misc.c')
-rw-r--r-- | module/zfs/spa_misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index 8466fa80e..1475a4a53 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -2307,7 +2307,7 @@ spa_import_progress_add(spa_t *spa) { spa_history_list_t *shl = spa_import_progress_list; spa_import_progress_t *sip; - char *poolname = NULL; + const char *poolname = NULL; sip = kmem_zalloc(sizeof (spa_import_progress_t), KM_SLEEP); sip->pool_guid = spa_guid(spa); |