Adding va_end(). Signed-off-by: Richard Knutsson <ricknu-0@xxxxxxxxxxxxxx> --- According to the manual, it needs a va_end() in the same function. Now it seems to be as many of va_end() as va_start(). diff --git a/parse.c b/parse.c index bae12ec..dfb922f 100644 --- a/parse.c +++ b/parse.c @@ -366,18 +366,18 @@ static void fn_local_symbol(struct symbol *sym) static int SENTINEL_ATTR match_idents(struct token *token, ...) { va_list args; + struct ident * next; if (token_type(token) != TOKEN_IDENT) return 0; va_start(args, token); - for (;;) { - struct ident * next = va_arg(args, struct ident *); - if (!next) - return 0; - if (token->ident == next) - return 1; - } + do { + next = va_arg(args, struct ident *); + } while (next && token->ident != next); + va_end(args); + + return next && token->ident == next; } - To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html