util/romcc: Don't reference a variable after checking it for NULL
Change-Id: Ic8e850bdf75d38fc061fb3a8c55d38bcf09c305a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1129146 Reviewed-on: https://review.coreboot.org/17886 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
44a46a1f04
commit
ded1e05d11
|
@ -21319,15 +21319,15 @@ static void verify_blocks(struct compile_state *state)
|
||||||
"computed users %d != stored users %d",
|
"computed users %d != stored users %d",
|
||||||
users, block->users);
|
users, block->users);
|
||||||
}
|
}
|
||||||
|
if (!(block->last->next) || !(block->last->next->u.block)) {
|
||||||
|
internal_error(state, block->last,
|
||||||
|
"bad next block");
|
||||||
|
}
|
||||||
if (!triple_stores_block(state, block->last->next)) {
|
if (!triple_stores_block(state, block->last->next)) {
|
||||||
internal_error(state, block->last->next,
|
internal_error(state, block->last->next,
|
||||||
"cannot find next block");
|
"cannot find next block");
|
||||||
}
|
}
|
||||||
block = block->last->next->u.block;
|
block = block->last->next->u.block;
|
||||||
if (!block) {
|
|
||||||
internal_error(state, block->last->next,
|
|
||||||
"bad next block");
|
|
||||||
}
|
|
||||||
} while(block != state->bb.first_block);
|
} while(block != state->bb.first_block);
|
||||||
if (blocks != state->bb.last_vertex) {
|
if (blocks != state->bb.last_vertex) {
|
||||||
internal_error(state, 0, "computed blocks: %d != stored blocks %d",
|
internal_error(state, 0, "computed blocks: %d != stored blocks %d",
|
||||||
|
|
Loading…
Reference in New Issue