X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsysctl%2Fsysctl.c;h=283eefe1a1d233e49786034668d64c80cbe507f6;hb=4c63a53ac5190dc8b837c15daefec5772de66bdc;hp=57112a7ef9eaf23c33f402f20948cb897f54f15e;hpb=e3e45d4f82daa5cd85ba40dde9127df900096c0c;p=elogind.git diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 57112a7ef..283eefe1a 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -65,7 +65,7 @@ static int apply_sysctl(const char *property, const char *value) { log_debug("Setting '%s' to '%s'", property, value); - p = new(char, sizeof("/proc/sys/") + strlen(property)); + p = new(char, strlen("/proc/sys/") + strlen(property) + 1); if (!p) return log_oom(); @@ -123,7 +123,7 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno assert(path); - r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f); + r = search_and_fopen_nulstr(path, "re", NULL, conf_file_dirs, &f); if (r < 0) { if (ignore_enoent && r == -ENOENT) return 0; @@ -245,7 +245,6 @@ static int parse_argv(int argc, char *argv[]) { case ARG_PREFIX: { char *p; - char **l; for (p = optarg; *p; p++) if (*p == '.')