chiark / gitweb /
build-sys: merge libsystemd-login into libsystemd
[elogind.git] / src / sysctl / sysctl.c
index 67c787225c3180861b8f7389b978dc825e86ec19..76efacb14a0227029b3a7d2a88dd36dd4ea9509a 100644 (file)
@@ -30,7 +30,6 @@
 #include "log.h"
 #include "strv.h"
 #include "util.h"
-#include "strv.h"
 #include "hashmap.h"
 #include "path-util.h"
 #include "conf-files.h"
@@ -133,7 +132,7 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno
                 return r;
         }
 
-        log_debug("parse: %s\n", path);
+        log_debug("parse: %s", path);
         while (!feof(f)) {
                 char l[LINE_MAX], *p, *value, *new_value, *property, *existing;
                 void *v;
@@ -246,19 +245,14 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_PREFIX: {
                         char *p;
-                        char **l;
 
                         for (p = optarg; *p; p++)
                                 if (*p == '.')
                                         *p = '/';
 
-                        l = strv_append(arg_prefixes, optarg);
-                        if (!l)
+                        if (strv_extend(&arg_prefixes, optarg) < 0)
                                 return log_oom();
 
-                        strv_free(arg_prefixes);
-                        arg_prefixes = l;
-
                         break;
                 }