diff options
author | Paul Dagnelie <[email protected]> | 2021-12-06 17:19:13 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-12-06 18:19:13 -0700 |
commit | 795075e63803db70793079c2176dc419df3788c5 (patch) | |
tree | bdec35b2b73d946efca2537691b114604f112ab8 /tests/zfs-tests/cmd | |
parent | 14ba514af6110bcc3772db7c7cde787861588316 (diff) |
Add `const` to nvlist functions to properly expose their real behavior
Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes #12728
Diffstat (limited to 'tests/zfs-tests/cmd')
-rw-r--r-- | tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c | 2 | ||||
-rw-r--r-- | tests/zfs-tests/cmd/nvlist_to_lua/nvlist_to_lua.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c b/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c index 0e552c268..fba18068c 100644 --- a/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c +++ b/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c @@ -603,7 +603,7 @@ test_channel_program(const char *pool) nvlist_t *args = fnvlist_alloc(); fnvlist_add_string(required, "program", program); - fnvlist_add_string_array(args, "argv", argv, 1); + fnvlist_add_string_array(args, "argv", (const char * const *)argv, 1); fnvlist_add_nvlist(required, "arg", args); fnvlist_add_boolean_value(optional, "sync", B_TRUE); diff --git a/tests/zfs-tests/cmd/nvlist_to_lua/nvlist_to_lua.c b/tests/zfs-tests/cmd/nvlist_to_lua/nvlist_to_lua.c index b130d667f..3072ca979 100644 --- a/tests/zfs-tests/cmd/nvlist_to_lua/nvlist_to_lua.c +++ b/tests/zfs-tests/cmd/nvlist_to_lua/nvlist_to_lua.c @@ -232,7 +232,7 @@ run_tests(void) } { char *const val[2] = { "0", "1" }; - fnvlist_add_string_array(nvl, key, val, 2); + fnvlist_add_string_array(nvl, key, (const char **)val, 2); test("string_array", B_TRUE, B_FALSE); } { @@ -241,7 +241,7 @@ run_tests(void) fnvlist_add_string(val[0], "subkey", "subvalue"); val[1] = fnvlist_alloc(); fnvlist_add_string(val[1], "subkey2", "subvalue2"); - fnvlist_add_nvlist_array(nvl, key, val, 2); + fnvlist_add_nvlist_array(nvl, key, (const nvlist_t **)val, 2); fnvlist_free(val[0]); fnvlist_free(val[1]); test("nvlist_array", B_FALSE, B_FALSE); |