From 7c2d80944afb4196f2eff614e8da1450dffcbeaa Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Thu, 7 Feb 2013 00:15:27 +0100 Subject: strv: add strv_print Clearer, and spares the temp variable. --- src/shared/strv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/shared/strv.c') 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); +} -- cgit v1.2.3-54-g00ecf