xdg-autostart: fix two coverity found issues
Fixes: CID#1429003 Fixes: CID#1429004
This commit is contained in:
parent
871dc8d644
commit
6527b019fc
|
@ -30,8 +30,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|||
|
||||
assert_se(service = xdg_autostart_service_parse_desktop(name));
|
||||
assert_se(service->name = strdup("fuzz-xdg-desktop.service"));
|
||||
if (service)
|
||||
(void) xdg_autostart_service_generate_unit(service, tmpdir);
|
||||
(void) xdg_autostart_service_generate_unit(service, tmpdir);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,6 @@ static int xdg_config_parse_bool(
|
|||
void *userdata) {
|
||||
|
||||
bool *b = data;
|
||||
const char *value;
|
||||
|
||||
assert(filename);
|
||||
assert(lvalue);
|
||||
|
@ -85,7 +84,7 @@ static int xdg_config_parse_bool(
|
|||
else if (streq(rvalue, "false"))
|
||||
*b = false;
|
||||
else
|
||||
return log_syntax(unit, LOG_ERR, filename, line, SYNTHETIC_ERRNO(EINVAL), "Invalid value for boolean: %s", value);
|
||||
return log_syntax(unit, LOG_ERR, filename, line, SYNTHETIC_ERRNO(EINVAL), "Invalid value for boolean: %s", rvalue);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue