[PATCH 09/10] testing for sym->op is unneeded for lookup_keyword()

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

 



All symbols returned by lookup_keyword() are of type SYM_KEYWORD,
because either:
   1) it's in NS_KEYWORD (and all symbol in NS_KEYWORD are SYM_KEYWORD)
   2) it's in NS_TYPEDEF and all *keywords* in NS_TYPEDEF are reserved
      and so can't be user defined and so must be SYM_KEYWORD.
Thus, they all have a symbol_op associated to them and it's
unneeded to test it.

So, remove the unneeded test.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse.c b/parse.c
index 2b7ef2ae23c4..d378f1255fee 100644
--- a/parse.c
+++ b/parse.c
@@ -2160,7 +2160,7 @@ static struct token *parse_asm_statement(struct token *token, struct statement *
 	stmt->type = STMT_ASM;
 	while (token_type(token) == TOKEN_IDENT) {
 		struct symbol *s = lookup_keyword(token->ident, NS_TYPEDEF);
-		if (s && s->op  && s->op->asm_modifier)
+		if (s && s->op->asm_modifier)
 			s->op->asm_modifier(token, &mods);
 		else if (token->ident == &goto_ident)
 			asm_modifier(token, &mods, MOD_ASM_GOTO);
-- 
2.28.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