I think the function name is confusing: we generally say "free_free" when
both keys and values are freed in a hash map, but here the type is an
array of strvs, so the name should be something like strv_array_free.
The function is unused since
143fadf369a18449464956206226761e49be1928 (2018),
let's just drop it.
return false;
}
-char*** strv_free_free(char ***l) {
- if (!l)
- return NULL;
-
- for (char ***i = l; *i; i++)
- strv_free(*i);
-
- return mfree(l);
-}
-
char** strv_skip(char **l, size_t n) {
while (n > 0) {
strv_fnmatch_full(patterns, s, flags, NULL);
}
-char*** strv_free_free(char ***l);
-DEFINE_TRIVIAL_CLEANUP_FUNC(char***, strv_free_free);
-
char** strv_skip(char **l, size_t n);
int strv_extend_n(char ***l, const char *value, size_t n);
test_strv_make_nulstr_one(STRV_MAKE("foo", "bar", "quuux"));
}
-TEST(strv_free_free) {
- char ***t;
-
- assert_se(t = new(char**, 3));
- assert_se(t[0] = strv_new("a", "b"));
- assert_se(t[1] = strv_new("c", "d", "e"));
- t[2] = NULL;
-
- t = strv_free_free(t);
-}
-
TEST(foreach_string) {
const char * const t[] = {
"foo",