diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-18 18:23:57 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-19 18:08:05 +0100 |
commit | 0dbc3bb8bfe0903d6b536e83a9643d403ff0ad3f (patch) | |
tree | 0a1d3d4e1ce144f8219f4c158152a3843a98ddd6 | |
parent | 626c474204e8262467a316099b6074cab964237c (diff) | |
download | sparse-0dbc3bb8bfe0903d6b536e83a9643d403ff0ad3f.tar.gz |
simplify unrestricted postop
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 be
tested in unrestrict().
So, simply call unrestrict() unconditionally.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | evaluate.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |