From 513f4d675a24a43f2588ef5cfe7a5b80fc207a49 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 21 Mar 2025 08:37:46 +0900 Subject: [PATCH] analyze: propagate error code returned by _from_string() Follow-up for a483c39fc20aced2178c908405fd020eda753964. Addresses https://github.com/systemd/systemd/pull/36468#discussion_r2005765024. --- src/analyze/analyze-condition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analyze/analyze-condition.c b/src/analyze/analyze-condition.c index 630c4b389be..111f24f8d98 100644 --- a/src/analyze/analyze-condition.c +++ b/src/analyze/analyze-condition.c @@ -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); -- 2.47.3