From: Michael Tremer Date: Thu, 9 Dec 2021 13:10:35 +0000 (+0000) Subject: parser: Reset r after no matches are found X-Git-Tag: 0.9.28~829 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbfd19fafbdf23fe3ce472521e0343662eed8d0b;p=pakfire.git parser: Reset r after no matches are found Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/parser.c b/src/libpakfire/parser.c index 8b5d33319..544fb557d 100644 --- a/src/libpakfire/parser.c +++ b/src/libpakfire/parser.c @@ -434,6 +434,7 @@ static int pakfire_parser_expand_commands(struct pakfire_parser* parser, char** // End loop when we have expanded all variables if (r == PCRE2_ERROR_NOMATCH) { DEBUG(parser->pakfire, "No (more) matches found\n"); + r = 0; break; } @@ -527,6 +528,7 @@ static int pakfire_parser_expand_variables(struct pakfire_parser* parser, // End loop when we have expanded all variables if (r == PCRE2_ERROR_NOMATCH) { DEBUG(parser->pakfire, "No (more) matches found in: %s\n", *buffer); + r = 0; break; }