strv: add strv_print

Clearer, and spares the temp variable.
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2013-02-07 00:38:09 +01:00
parent fa3cd7394c
commit 7c2d80944a
5 changed files with 17 additions and 19 deletions
+10
View File
@@ -774,3 +774,13 @@ char **strv_sort(char **l) {
qsort(l, strv_length(l), sizeof(char*), str_compare);
return l;
}
void strv_print(char **l) {
char **s;
if (!l)
return;
STRV_FOREACH(s, l)
puts(*s);
}
+1
View File
@@ -87,3 +87,4 @@ bool strv_overlap(char **a, char **b);
char **strv_sort(char **l);
void strv_print(char **l);