[PATCH 1/2] dump-macro: break the loop at TOKEN_UNTAINT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 pre-process.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pre-process.c b/pre-process.c
index f0a9cf24c..1b3fdc2f9 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;
-- 
2.19.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux