aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-06-05 10:47:10 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-06-05 10:47:10 +0400
commit2f40375077d448b0fea238db726a1e58ad6da74a (patch)
tree0e96ae36325979869a42c909c4acf9820f156ee4
parentc57eb515279d293d64f483724e8a4f18732185e9 (diff)
downloadnasm-test-2f40375077d448b0fea238db726a1e58ad6da74a.tar.gz
nasm-test-2f40375077d448b0fea238db726a1e58ad6da74a.tar.xz
nasm-test-2f40375077d448b0fea238db726a1e58ad6da74a.zip
expand_mmac_params_range: Simplify condition
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--preproc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/preproc.c b/preproc.c
index 0dfc3a43..1b0c74a2 100644
--- a/preproc.c
+++ b/preproc.c
@@ -3617,10 +3617,8 @@ static Token *expand_mmac_params_range(MMacro *mac, Token *tline, Token ***last)
goto err;
/* the values should be sane */
- if ((fst > 0 && fst > mac->nparam) ||
- (fst < 0 && fst < -(int)mac->nparam) ||
- (lst > 0 && lst > mac->nparam) ||
- (lst < 0 && lst < -(int)mac->nparam))
+ if ((fst > (int)mac->nparam || fst < (-(int)mac->nparam)) ||
+ (lst > (int)mac->nparam || lst < (-(int)mac->nparam)))
goto err;
fst = fst < 0 ? fst + mac->nparam + 1: fst;