summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2009-11-01 23:16:01 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2009-11-03 21:37:09 +0300
commitbc31bee760c288e46977d239136bc88776618eeb (patch)
tree298c0dfe8f9426502f33057d7a402200f46a842d
parentb640a917cddd576e25be07aa9dd08d480c77703a (diff)
downloadnasm-bc31bee760c288e46977d239136bc88776618eeb.tar.gz
matches: simplify check operand size actions
We may throw out j variable (since we break anyway) and don't assign asize for free (since we don't use it after). Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--assemble.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/assemble.c b/assemble.c
index 5fceea33..d792f12b 100644
--- a/assemble.c
+++ b/assemble.c
@@ -2136,12 +2136,11 @@ static enum match_result matches(const struct itemplate *itemp,
*/
if (itemp->flags & (IF_SM | IF_SM2)) {
oprs = (itemp->flags & IF_SM2 ? 2 : itemp->operands);
- asize = 0;
for (i = 0; i < oprs; i++) {
- if ((asize = itemp->opd[i] & SIZE_MASK) != 0) {
- int j;
- for (j = 0; j < oprs; j++)
- size[j] = asize;
+ asize = itemp->opd[i] & SIZE_MASK;
+ if (asize) {
+ for (i = 0; i < oprs; i++)
+ size[i] = asize;
break;
}
}