take care of a compiler warning

pull/2003/head
Rohit Grover 2016-06-24 15:18:25 +01:00
parent 7b110f077e
commit b12f0c2ad2
1 changed files with 1 additions and 1 deletions

View File

@ -982,7 +982,7 @@ int32_t nextBlock(const ARM_STORAGE_BLOCK *prevP, ARM_STORAGE_BLOCK *nextP)
}
static const size_t NUM_SEGMENTS = sizeof(blockTable) / sizeof(ARM_STORAGE_BLOCK);
for (size_t index = 0; index < (NUM_SEGMENTS - 1); index++) {
for (size_t index = 0; (NUM_SEGMENTS > 1) && (index < (NUM_SEGMENTS - 1)); index++) {
if ((blockTable[index].addr == prevP->addr) && (blockTable[index].size == prevP->size)) {
if (nextP) {
memcpy(nextP, &blockTable[index + 1], sizeof(ARM_STORAGE_BLOCK));