tree-wide: Fix declaration/definition parameter name mismatches

This commit is contained in:
Daan De Meyer
2025-11-26 19:02:31 +09:00
committed by Yu Watanabe
parent a8374a7607
commit 6a9f0641cd
227 changed files with 821 additions and 675 deletions
+5 -5
View File
@@ -159,17 +159,17 @@ void strv_free_many(char ***strvs, size_t n) {
free(strvs);
}
char** strv_copy_n(char * const *l, size_t m) {
char** strv_copy_n(char * const *l, size_t n) {
_cleanup_strv_free_ char **result = NULL;
char **k;
result = new(char*, MIN(strv_length(l), m) + 1);
result = new(char*, MIN(strv_length(l), n) + 1);
if (!result)
return NULL;
k = result;
STRV_FOREACH(i, l) {
if (m == 0)
if (n == 0)
break;
*k = strdup(*i);
@@ -177,8 +177,8 @@ char** strv_copy_n(char * const *l, size_t m) {
return NULL;
k++;
if (m != SIZE_MAX)
m--;
if (n != SIZE_MAX)
n--;
}
*k = NULL;