coredump: Fix return value in coredump_parse()
The coredump_parse() function is bool type. It should return true on
success and false on failure. The cn_printf() returns zero on success
or negative error codes. This mismatch means that when "return err;"
here, it is treated as success instead of failure. Change it to return
false instead.
Fixes: a5715af549 ("coredump: make coredump_parse() return bool")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/aKRGu14w5vPSZLgv@stanley.mountain
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
+1
-1
@@ -345,7 +345,7 @@ static bool coredump_parse(struct core_name *cn, struct coredump_params *cprm,
|
||||
was_space = false;
|
||||
err = cn_printf(cn, "%c", '\0');
|
||||
if (err)
|
||||
return err;
|
||||
return false;
|
||||
(*argv)[(*argc)++] = cn->used;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user