From bc31bee760c288e46977d239136bc88776618eeb Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 1 Nov 2009 23:16:01 +0300 Subject: 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 --- assemble.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'assemble.c') diff --git a/assemble.c b/assemble.c index 5fceea3..d792f12 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; } } -- cgit v1.2.3