diff options
| author | ricknu-0@student.ltu.se <ricknu-0@student.ltu.se> | 2007-07-27 01:28:22 +0200 |
|---|---|---|
| committer | Josh Triplett <josh@kernel.org> | 2007-07-27 10:21:17 -0700 |
| commit | 58af88c40f307476ffa482ed16b5e0586fea1b6f (patch) | |
| tree | 145f7c25cd3c929ceba2418d4eadc85c4d11fe20 | |
| parent | 265c5209bd447405b8ce54b07808c5e47c56d2ce (diff) | |
| download | sparse-dev-58af88c40f307476ffa482ed16b5e0586fea1b6f.tar.gz | |
parse.c: Adding va_end().
Adding va_end().
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
| -rw-r--r-- | parse.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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; } |
