]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sysctl: Don't pass null directive argument to '%s'
authorKhem Raj <raj.khem@gmail.com>
Mon, 17 Dec 2018 04:53:38 +0000 (20:53 -0800)
committerKhem Raj <raj.khem@gmail.com>
Mon, 17 Dec 2018 05:01:39 +0000 (21:01 -0800)
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>
src/sysctl/sysctl.c

index 1cfe51018073db09e8fa199fba49761aa36ae31d..c67d79032378948028aa996740735d66a7a6af8a 100644 (file)
@@ -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;