summaryrefslogtreecommitdiff
path: root/src/hashmap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-25 04:58:02 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-25 04:58:02 +0200
commit729e3769c32242bbba26ea96900be005d52ce438 (patch)
treea8a6234044790254e3834e1e67971df93613b918 /src/hashmap.c
parent4b7a6af440ee1a957fd8fe1c6ca3b7f310fdf77c (diff)
systemctl: hook up new install logic
This adds a number of new options to systemctl, for presets, reenabling, masking/unmask, and runtime operations.
Diffstat (limited to 'src/hashmap.c')
-rw-r--r--src/hashmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hashmap.c b/src/hashmap.c
index 53502576ad..ca83e93385 100644
--- a/src/hashmap.c
+++ b/src/hashmap.c
@@ -596,16 +596,16 @@ Hashmap *hashmap_copy(Hashmap *h) {
char **hashmap_get_strv(Hashmap *h) {
char **sv;
Iterator it;
- char *path;
+ char *item;
int n;
- sv = malloc((h->n_entries+1) * sizeof(char *));
- if (sv == NULL)
+ sv = new(char*, h->n_entries+1);
+ if (!sv)
return NULL;
n = 0;
- HASHMAP_FOREACH(path, h, it)
- sv[n++] = path;
+ HASHMAP_FOREACH(item, h, it)
+ sv[n++] = item;
sv[n] = NULL;
return sv;