analyze: propagate error code returned by _from_string()

Follow-up for a483c39fc2.
Addresses https://github.com/systemd/systemd/pull/36468#discussion_r2005765024.
This commit is contained in:
Yu Watanabe
2025-03-21 10:31:46 +09:00
parent 3cb0551ecb
commit 513f4d675a
+1 -1
View File
@@ -36,7 +36,7 @@ static int parse_condition(Unit *u, const char *line) {
type = assert_type_from_string(type_string);
}
if (type < 0)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot parse \"%s\".", line);
return log_error_errno(type, "Cannot parse \"%s\".", line);
const char *val = skip_leading_chars(eq + 1, /* bad = */ NULL);