X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsysctl%2Fsysctl.c;h=76efacb14a0227029b3a7d2a88dd36dd4ea9509a;hb=6a38d04a036475bfc222f40961e2adcaa70a6174;hp=67c787225c3180861b8f7389b978dc825e86ec19;hpb=eb9da376d76b48585b3b63b4f91903b54f7abd36;p=elogind.git diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 67c787225..76efacb14 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -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; }