chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: get rid of X11 display socket symlink
[elogind.git]
/
src
/
sysctl
/
sysctl.c
diff --git
a/src/sysctl/sysctl.c
b/src/sysctl/sysctl.c
index 449e0cadd530bb26e507c3ad9b947a3cc8e2755f..76efacb14a0227029b3a7d2a88dd36dd4ea9509a 100644
(file)
--- a/
src/sysctl/sysctl.c
+++ b/
src/sysctl/sysctl.c
@@
-132,7
+132,7
@@
static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno
return r;
}
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;
while (!feof(f)) {
char l[LINE_MAX], *p, *value, *new_value, *property, *existing;
void *v;
@@
-245,19
+245,14
@@
static int parse_argv(int argc, char *argv[]) {
case ARG_PREFIX: {
char *p;
case ARG_PREFIX: {
char *p;
- char **l;
for (p = optarg; *p; p++)
if (*p == '.')
*p = '/';
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();
return log_oom();
- strv_free(arg_prefixes);
- arg_prefixes = l;
-
break;
}
break;
}