From: nasm-bot f. H. P. A. <hp...@li...> - 2013-11-08 23:30:21
|
Commit-ID: c6c750cb3ddd094fa8195cdcd6d5c8c1d1d02d60 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=c6c750cb3ddd094fa8195cdcd6d5c8c1d1d02d60 Author: H. Peter Anvin <hp...@li...> AuthorDate: Fri, 8 Nov 2013 15:28:19 -0800 Committer: H. Peter Anvin <hp...@li...> CommitDate: Fri, 8 Nov 2013 15:28:19 -0800 Add (redundant) parentheses around bit tests mixed with && It is easy to get confused when mixing & and &&, so add redundant parenteses for clarity. Signed-off-by: H. Peter Anvin <hp...@li...> --- assemble.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assemble.c b/assemble.c index 63f684a..57ef0cd 100644 --- a/assemble.c +++ b/assemble.c @@ -1872,7 +1872,7 @@ static int rexflags(int val, opflags_t flags, int mask) { int rex = 0; - if (val >= 0 && val & 8) + if (val >= 0 && (val & 8)) rex |= REX_B|REX_X|REX_R; if (flags & BITS64) rex |= REX_W; @@ -1891,11 +1891,11 @@ static int evexflags(int val, decoflags_t deco, switch (byte) { case 0: - if (val >= 0 && val & 16) + if (val >= 0 && (val & 16)) evex |= (EVEX_P0RP | EVEX_P0X); break; case 2: - if (val >= 0 && val & 16) + if (val >= 0 && (val & 16)) evex |= EVEX_P2VP; if (deco & Z) evex |= EVEX_P2Z; |