cbfstool: prepare moving tests earlier
The assert() makes sure the if() holds true. But that assert won't survive for long. Change-Id: Iab7d2bc7bfebb3f3b3ce70dc5bd041902e14bd7a Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/11220 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
57edf16be5
commit
db01ddfd49
@ -616,6 +616,7 @@ int cbfs_add_entry(struct cbfs_image *image, struct buffer *buffer,
|
|||||||
// We need to put content here, and the case is really
|
// We need to put content here, and the case is really
|
||||||
// complicated...
|
// complicated...
|
||||||
assert(content_offset);
|
assert(content_offset);
|
||||||
|
if (content_offset > 0) {
|
||||||
if (addr_next < content_offset) {
|
if (addr_next < content_offset) {
|
||||||
DEBUG("Not for specified offset yet");
|
DEBUG("Not for specified offset yet");
|
||||||
continue;
|
continue;
|
||||||
@ -629,6 +630,7 @@ int cbfs_add_entry(struct cbfs_image *image, struct buffer *buffer,
|
|||||||
ERROR("Not enough space for content.\n");
|
ERROR("Not enough space for content.\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO there are more few tricky cases that we may
|
// TODO there are more few tricky cases that we may
|
||||||
// want to fit by altering offset.
|
// want to fit by altering offset.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user