]> git.ipfire.org Git - pakfire.git/commitdiff
parser: Reset r after no matches are found
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Dec 2021 13:10:35 +0000 (13:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Dec 2021 13:10:35 +0000 (13:10 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/parser.c

index 8b5d33319ae8172afe8e44bb94d0c8b27a9ce30a..544fb557ddaa5c6d8406ab717a7ce7b5a9e52b30 100644 (file)
@@ -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;
                }