summaryrefslogtreecommitdiff
path: root/src/sysctl
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-16 20:53:38 -0800
committerKhem Raj <raj.khem@gmail.com>2018-12-16 21:01:39 -0800
commitbfc4183ea995f1c211385d066cdb1fe9ce89f621 (patch)
tree3bed747051b6535c29c17358c7e1047edb4f8b08 /src/sysctl
parent45cb8247d953d2ed4a8cb550296943933bf10a1b (diff)
downloadsystemd-bfc4183ea995f1c211385d066cdb1fe9ce89f621.tar.gz
sysctl: Don't pass null directive argument to '%s'
value pointer here is always NULL but subsequent use of that pointer with a %s format will always be NULL, printing p instead would be a valid string Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'src/sysctl')
-rw-r--r--src/sysctl/sysctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
index 1cfe510180..c67d790323 100644
--- a/src/sysctl/sysctl.c
+++ b/src/sysctl/sysctl.c
@@ -115,7 +115,7 @@ static int parse_file(OrderedHashmap *sysctl_options, const char *path, bool ign
value = strchr(p, '=');
if (!value) {
- log_error("Line is not an assignment at '%s:%u': %s", path, c, value);
+ log_error("Line is not an assignment at '%s:%u': %s", path, c, p);
if (r == 0)
r = -EINVAL;