[PATCH] simplify unrestricted postop

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

 



The '++' and '--' operator used in evaluate_postop() are
'restricted' operators. It's thus unneeded to call restricted_unop()
on them as it will always return '1'.

It's also unneeded to test for TYPE_RESTRICT since it will also bes
tested in unrestrict().

So, simply call unrestrict() unconditionally.

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

diff --git a/evaluate.c b/evaluate.c
index c39f9ec73da9..3567f702b8ac 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1919,8 +1919,7 @@ static struct symbol *evaluate_postop(struct expression *expr)
 		return NULL;
 	}
 
-	if ((class & TYPE_RESTRICT) && restricted_unop(expr->op, &ctype))
-		unrestrict(expr, class, &ctype);
+	unrestrict(expr, class, &ctype);
 
 	if (class & TYPE_NUM) {
 		multiply = 1;
-- 
2.29.2




[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