From: Khem Raj Date: Mon, 17 Dec 2018 04:53:38 +0000 (-0800) Subject: (backport) sysctl: Don't pass null directive argument to '%s' X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fd7fe3bace1133b4db7313dd19c9ef38e7a4aa2;p=platform%2Fupstream%2Fsystemd.git (backport) 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 Change-Id: Ib74f46d69eaf5e3d149523d53beef1f060a5fc16 Signed-off-by: Khem Raj --- diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index b3587e2..6f9b427 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -127,7 +127,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;