Skip to content

Commit

Permalink
sysctl: Don't pass null directive argument to '%s'
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kraj committed Dec 17, 2018
1 parent 45cb824 commit bfc4183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sysctl/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bfc4183

Please sign in to comment.