mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
treewide: try to use const char * for string literals
This commit is contained in:
parent
fc72208fa0
commit
436787d6ba
9 changed files with 20 additions and 17 deletions
|
|
@ -166,7 +166,7 @@ PWTEST(json_encode)
|
|||
return PWTEST_PASS;
|
||||
}
|
||||
|
||||
static void test_array(char *str, char **vals)
|
||||
static void test_array(const char *str, const char * const vals[])
|
||||
{
|
||||
struct spa_json it[2];
|
||||
char val[256];
|
||||
|
|
@ -183,12 +183,12 @@ static void test_array(char *str, char **vals)
|
|||
|
||||
PWTEST(json_array)
|
||||
{
|
||||
test_array("FL,FR", (char *[]){ "FL", "FR", NULL });
|
||||
test_array(" FL , FR ", (char *[]){ "FL", "FR", NULL });
|
||||
test_array("[ FL , FR ]", (char *[]){ "FL", "FR", NULL });
|
||||
test_array("[FL FR]", (char *[]){ "FL", "FR", NULL });
|
||||
test_array("FL FR", (char *[]){ "FL", "FR", NULL });
|
||||
test_array("[ FL FR ]", (char *[]){ "FL", "FR", NULL });
|
||||
test_array("FL,FR", (const char *[]){ "FL", "FR", NULL });
|
||||
test_array(" FL , FR ", (const char *[]){ "FL", "FR", NULL });
|
||||
test_array("[ FL , FR ]", (const char *[]){ "FL", "FR", NULL });
|
||||
test_array("[FL FR]", (const char *[]){ "FL", "FR", NULL });
|
||||
test_array("FL FR", (const char *[]){ "FL", "FR", NULL });
|
||||
test_array("[ FL FR ]", (const char *[]){ "FL", "FR", NULL });
|
||||
|
||||
return PWTEST_PASS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue