diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-11-21 01:58:32 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-11-24 18:45:01 +0100 |
commit | 104f18af103f969ccd57ade37078937b1a3e7255 (patch) | |
tree | aaf3be3600c5aa4130f718f12e9071b2980b19c4 | |
parent | 500e7908ab50a9388688dff8704df0fc20d0bea9 (diff) | |
download | sparse-104f18af103f969ccd57ade37078937b1a3e7255.tar.gz |
dump-macro: break the loop at TOKEN_UNTAINT
Since EOF are preceded by an UNTAINT, these UNTAINTs
need to be special cased to not print a whitespace and
are otherwise ignored, it make the handling of the
whitespaces slightly simpler to stop the loop not at EOF
but at these UNTAINT.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | pre-process.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pre-process.c b/pre-process.c index f0a9cf24..1b3fdc2f 100644 --- a/pre-process.c +++ b/pre-process.c @@ -2200,11 +2200,9 @@ static void dump_macro(struct symbol *sym) putchar(' '); token = sym->expansion; - while (!eof_token(token)) { + while (token_type(token) != TOKEN_UNTAINT) { struct token *next = token->next; switch (token_type(token)) { - case TOKEN_UNTAINT: - break; case TOKEN_CONCAT: printf("## "); break; |