diff --git a/mps/code/arenavm.c b/mps/code/arenavm.c index ba2ca7e85fb..67f71247ef2 100644 --- a/mps/code/arenavm.c +++ b/mps/code/arenavm.c @@ -848,7 +848,8 @@ static Bool pagesFindFreeInZones(Index *baseReturn, VMChunk *chunkReturn, break; } - AVER(base < limit && limit < chunk->limit); + AVER(base < limit); + AVER(limit < chunk->limit); } while(ZoneSetIsMember(arena, zones, limit)); /* If the ZoneSet was universal, then the area found ought to */ diff --git a/mps/code/mpm.c b/mps/code/mpm.c index 8ffee3c808e..0930be4c6d3 100644 --- a/mps/code/mpm.c +++ b/mps/code/mpm.c @@ -234,7 +234,8 @@ static Res WriteWord(mps_lib_FILE *stream, Word w, unsigned base, int r; AVER(stream != NULL); - AVER(2 <= base && base <= 16); + AVER(2 <= base); + AVER(base <= 16); AVER(width <= MPS_WORD_WIDTH); /* Add digits to the buffer starting at the right-hand end, so that */ diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index 14cb1b441d9..2641150e745 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c @@ -666,8 +666,10 @@ static void amcNailMarkRange(Seg seg, Addr base, Addr limit) Index ibase, ilimit; Size headerSize; - AVER(SegBase(seg) <= base && base < SegLimit(seg)); - AVER(SegBase(seg) <= limit && limit <= SegLimit(seg)); + AVER(SegBase(seg) <= base); + AVER(base < SegLimit(seg)); + AVER(SegBase(seg) <= limit); + AVER(limit <= SegLimit(seg)); AVER(base < limit); board = amcSegNailboard(seg); @@ -694,8 +696,10 @@ static Bool amcNailRangeIsMarked(Seg seg, Addr base, Addr limit) Index ibase, ilimit; Size headerSize; - AVER(SegBase(seg) <= base && base < SegLimit(seg)); - AVER(SegBase(seg) <= limit && limit <= SegLimit(seg)); + AVER(SegBase(seg) <= base); + AVER(base < SegLimit(seg)); + AVER(SegBase(seg) <= limit); + AVER(limit <= SegLimit(seg)); AVER(base < limit); board = amcSegNailboard(seg); @@ -1282,8 +1286,8 @@ static Res AMCScan(Bool *totalReturn, ScanState ss, Pool pool, Seg seg) /* @@@@ base? */ limit = AddrAdd(SegLimit(seg), format->headerSize); - AVER(SegBase(seg) <= base - && base <= AddrAdd(SegLimit(seg), format->headerSize)); + AVER(SegBase(seg) <= base); + AVER(base <= AddrAdd(SegLimit(seg), format->headerSize)); if (base < limit) { res = (*format->scan)(ss, base, limit); if (res != ResOK) { @@ -2030,7 +2034,8 @@ static Bool AMCCheck(AMC amc) CHECKD(amcGen, amc->afterRampGen); } /* nothing to check for rampCount */ - CHECKL(amc->rampMode >= outsideRamp && amc->rampMode <= collectingRamp); + CHECKL(amc->rampMode >= outsideRamp); + CHECKL(amc->rampMode <= collectingRamp); return TRUE; } diff --git a/mps/code/poolams.c b/mps/code/poolams.c index d649a4794f2..cf65d80c1e3 100644 --- a/mps/code/poolams.c +++ b/mps/code/poolams.c @@ -1176,7 +1176,8 @@ static Res amsIterate(Seg seg, AMSObjectFunction f, void *closure) /* Find out how large the free block is. */ more = BTFindLongResRange(&dummy, &nextIndex, amsseg->allocTable, i, amsseg->grains, 1); - AVER(more && dummy == i); + AVER(more); + AVER(dummy == i); next = AMS_INDEX_ADDR(seg, nextIndex); } else { /* If there's no allocTable, this is the free block at the end. */ diff --git a/mps/code/poolawl.c b/mps/code/poolawl.c index d328b23edb9..0e4ea8b281c 100644 --- a/mps/code/poolawl.c +++ b/mps/code/poolawl.c @@ -1239,7 +1239,8 @@ static Bool AWLCheck(AWL awl) CHECKL(1uL << awl->alignShift == awl->poolStruct.alignment); CHECKD(Chain, awl->chain); /* 30 is just a sanity check really, not a constraint. */ - CHECKL(0 <= awl->gen && awl->gen <= 30); + CHECKL(0 <= awl->gen); + CHECKL(awl->gen <= 30); /* Nothing to check about succAccesses. */ CHECKL(FUNCHECK(awl->findDependent)); /* Don't bother to check stats. */ diff --git a/mps/code/poollo.c b/mps/code/poollo.c index c5bc67bd44f..0b98262e9a8 100644 --- a/mps/code/poollo.c +++ b/mps/code/poollo.c @@ -639,8 +639,10 @@ static void LOBufferEmpty(Pool pool, Buffer buffer, Addr init, Addr limit) segBase = SegBase(seg); AVER(AddrIsAligned(base, PoolAlignment(pool))); - AVER(segBase <= base && base < SegLimit(seg)); - AVER(segBase <= init && init <= SegLimit(seg)); + AVER(segBase <= base); + AVER(base < SegLimit(seg)); + AVER(segBase <= init); + AVER(init <= SegLimit(seg)); /* convert base, init, and limit, to quantum positions */ baseIndex = loIndexOfAddr(segBase, lo, base); diff --git a/mps/code/poolmv.c b/mps/code/poolmv.c index 4c256513eed..0b3d1c2d88d 100644 --- a/mps/code/poolmv.c +++ b/mps/code/poolmv.c @@ -363,7 +363,8 @@ static Res MVSpanFree(MVSpan span, Addr base, Addr limit, Pool blockPool) Size freeAreaSize = 0; /* .design.largest.free */ AVERT(MVSpan, span); - AVER(span->base.base <= base && limit <= span->limit.limit); + AVER(span->base.base <= base); + AVER(limit <= span->limit.limit); AVERT(Pool, blockPool); prev = NULL; @@ -594,7 +595,8 @@ static void MVFree(Pool pool, Addr old, Size size) AVERT(MVSpan, span); /* the to be freed area should be within the span just found */ - AVER(span->base.base <= base && limit <= span->limit.limit); + AVER(span->base.base <= base); + AVER(limit <= span->limit.limit); /* Unfortunately, if allocating the new block descriptor fails we */ /* can't do anything, and the memory is lost. See note 2. */ diff --git a/mps/code/splay.c b/mps/code/splay.c index fc79e4fe190..388353b0849 100644 --- a/mps/code/splay.c +++ b/mps/code/splay.c @@ -830,8 +830,8 @@ static Compare SplayFindFirstCompare(void *key, SplayNode node) } else if ((*testNode)(tree, node, closureP, closureS)) { return CompareEQUAL; } else { - AVER(SplayNodeRightChild(node) != NULL && - (*testTree)(tree, SplayNodeRightChild(node), closureP, closureS)); + AVER(SplayNodeRightChild(node) != NULL); + AVER((*testTree)(tree, SplayNodeRightChild(node), closureP, closureS)); return CompareGREATER; } } @@ -861,8 +861,8 @@ static Compare SplayFindLastCompare(void *key, SplayNode node) } else if ((*testNode)(tree, node, closureP, closureS)) { return CompareEQUAL; } else { - AVER(SplayNodeLeftChild(node) != NULL && - (*testTree)(tree, SplayNodeLeftChild(node), closureP, closureS)); + AVER(SplayNodeLeftChild(node) != NULL); + AVER((*testTree)(tree, SplayNodeLeftChild(node), closureP, closureS)); return CompareLESS; } } diff --git a/mps/code/trace.c b/mps/code/trace.c index edd7714562f..ae97e702d6e 100644 --- a/mps/code/trace.c +++ b/mps/code/trace.c @@ -1401,7 +1401,8 @@ void TraceStart(Trace trace, double mortality, double finishingTime) AVERT(Trace, trace); AVER(trace->state == TraceINIT); - AVER(0.0 <= mortality && mortality <= 1.0); + AVER(0.0 <= mortality); + AVER(mortality <= 1.0); arena = trace->arena; AVER(finishingTime >= 0.0);