util/romcc: Move access after NULL-check
Change-Id: I7f9c38fd6e75b32fe1ed8a60c7054f4dd1fcd5c0 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1129104 Reviewed-on: https://review.coreboot.org/17884 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
f23cba082c
commit
f78e658dac
|
@ -6287,10 +6287,10 @@ static size_t field_reg_offset(struct compile_state *state,
|
||||||
internal_error(state, 0, "field_reg_offset only works on structures and unions");
|
internal_error(state, 0, "field_reg_offset only works on structures and unions");
|
||||||
}
|
}
|
||||||
|
|
||||||
size += reg_needed_padding(state, member, size);
|
|
||||||
if (!member || (member->field_ident != field)) {
|
if (!member || (member->field_ident != field)) {
|
||||||
error(state, 0, "member %s not present", field->name);
|
error(state, 0, "member %s not present", field->name);
|
||||||
}
|
}
|
||||||
|
size += reg_needed_padding(state, member, size);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue