mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 18:55:24 +00:00
Fix coverity warnings in firmware
Assorted minor code issues, which we should fix so any new errors stand out more. BUG=chromium:643769 BRANCH=none TEST=make runtests Change-Id: I84182df0d0e222f4f60206c621ec62e1ee283adb Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/380697 Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
f7559e4b46
commit
1589f94dc1
@@ -419,14 +419,14 @@ int VerifyVmlinuzInsideKBlob(uint64_t kblob, uint64_t kblob_size,
|
||||
|
||||
uint64_t VbSharedDataReserve(VbSharedDataHeader *header, uint64_t size)
|
||||
{
|
||||
uint64_t offs = header->data_used;
|
||||
|
||||
VBDEBUG(("VbSharedDataReserve %d bytes at %d\n", (int)size, (int)offs));
|
||||
|
||||
if (!header || size > header->data_size - header->data_used) {
|
||||
VBDEBUG(("VbSharedData buffer out of space.\n"));
|
||||
return 0; /* Not initialized, or not enough space left. */
|
||||
}
|
||||
|
||||
uint64_t offs = header->data_used;
|
||||
VBDEBUG(("VbSharedDataReserve %d bytes at %d\n", (int)size, (int)offs));
|
||||
|
||||
header->data_used += size;
|
||||
return offs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user