From b832a94f5d8bfd393cee34915143c9d6b1a501b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 5 Nov 2023 04:21:47 +0100 Subject: [PATCH] pipewire: utils: make `pw_strv_find()` take a `const char *` There is no reason to take just a `char *` as the string only ever read. --- src/pipewire/utils.c | 2 +- src/pipewire/utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pipewire/utils.c b/src/pipewire/utils.c index 3bbbb170c..aeb0f7803 100644 --- a/src/pipewire/utils.c +++ b/src/pipewire/utils.c @@ -162,7 +162,7 @@ char **pw_strv_parse(const char *val, size_t len, int max_tokens, int *n_tokens) * \since 0.3.84 */ SPA_EXPORT -int pw_strv_find(char **a, char *b) +int pw_strv_find(char **a, const char *b) { int i; if (a == NULL || b == NULL) diff --git a/src/pipewire/utils.h b/src/pipewire/utils.h index 92f8d004a..9889fd7f5 100644 --- a/src/pipewire/utils.h +++ b/src/pipewire/utils.h @@ -48,7 +48,7 @@ pw_split_ip(char *str, const char *delimiter, int max_tokens, char *tokens[]); char **pw_strv_parse(const char *val, size_t len, int max_tokens, int *n_tokens); -int pw_strv_find(char **a, char *b); +int pw_strv_find(char **a, const char *b); int pw_strv_find_common(char **a, char **b);