From: Khem Raj Date: Mon, 17 Dec 2018 04:53:38 +0000 (-0800) Subject: sysctl: Don't pass null directive argument to '%s' X-Git-Tag: v240~46^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfc4183ea995f1c211385d066cdb1fe9ce89f621;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 1cfe5101807..c67d7903237 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;