X Tutup
Skip to content

Commit bfc4183

Browse files
committed
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>
1 parent 45cb824 commit bfc4183

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sysctl/sysctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static int parse_file(OrderedHashmap *sysctl_options, const char *path, bool ign
115115

116116
value = strchr(p, '=');
117117
if (!value) {
118-
log_error("Line is not an assignment at '%s:%u': %s", path, c, value);
118+
log_error("Line is not an assignment at '%s:%u': %s", path, c, p);
119119

120120
if (r == 0)
121121
r = -EINVAL;

0 commit comments

Comments
 (0)
X Tutup