summaryrefslogtreecommitdiff
path: root/src/shared/strv.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-02-07 00:15:27 +0100
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-02-07 00:38:09 +0100
commit7c2d80944afb4196f2eff614e8da1450dffcbeaa (patch)
tree5cdf18700cdfd9471eaee67e78661b286b9c98f2 /src/shared/strv.c
parentfa3cd7394c227ad38c5c09b2bc2d035e7fb14a76 (diff)
strv: add strv_print
Clearer, and spares the temp variable.
Diffstat (limited to 'src/shared/strv.c')
-rw-r--r--src/shared/strv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/strv.c b/src/shared/strv.c
index 2d556f4a07..fc6104ffea 100644
--- a/src/shared/strv.c
+++ b/src/shared/strv.c
@@ -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);
+}