summaryrefslogtreecommitdiff
path: root/src/locale/localectl.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/locale/localectl.c
parentfa3cd7394c227ad38c5c09b2bc2d035e7fb14a76 (diff)
strv: add strv_print
Clearer, and spares the temp variable.
Diffstat (limited to 'src/locale/localectl.c')
-rw-r--r--src/locale/localectl.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index 290edcc103..8c3c8e3f0f 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -432,7 +432,6 @@ static int add_locales_from_libdir (Set *locales) {
static int list_locales(DBusConnection *bus, char **args, unsigned n) {
_cleanup_set_free_ Set *locales;
_cleanup_strv_free_ char **l = NULL;
- char **j;
int r;
locales = set_new(string_hash_func, string_compare_func);
@@ -455,8 +454,7 @@ static int list_locales(DBusConnection *bus, char **args, unsigned n) {
pager_open_if_enabled();
- STRV_FOREACH(j, l)
- puts(*j);
+ strv_print(l);
return 0;
}
@@ -539,7 +537,6 @@ static int nftw_cb(
static int list_vconsole_keymaps(DBusConnection *bus, char **args, unsigned n) {
char _cleanup_strv_free_ **l = NULL;
- char **i;
keymaps = set_new(string_hash_func, string_compare_func);
if (!keymaps)
@@ -566,9 +563,7 @@ static int list_vconsole_keymaps(DBusConnection *bus, char **args, unsigned n) {
pager_open_if_enabled();
- STRV_FOREACH(i, l)
- puts(*i);
-
+ strv_print(l);
return 0;
}