mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Change functions which return literals to return const char*
get_format_prompt_string() and zpool_state_to_name() return a string literal which is read-only, thus they should return `const char*`. zpool_get_prop_string() returns a non-const string after successful nv-lookup, and returns a string literal otherwise. Since this function is designed to be used for read-only purpose, the return type should also be `const char*`. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com> Closes #7285
This commit is contained in:
committed by
Brian Behlendorf
parent
cf63739191
commit
6b8655ad3f
@@ -1654,7 +1654,7 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
||||
char *vname;
|
||||
uint64_t notpresent;
|
||||
spare_cbdata_t spare_cb;
|
||||
char *state;
|
||||
const char *state;
|
||||
char *path = NULL;
|
||||
|
||||
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN,
|
||||
|
||||
Reference in New Issue
Block a user