mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add const to nvlist functions to properly expose their real behavior
Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Closes #12728
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user