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:
Randall Spangler
2016-09-02 12:10:31 -07:00
committed by chrome-bot
parent f7559e4b46
commit 1589f94dc1
6 changed files with 37 additions and 26 deletions

View File

@@ -24,7 +24,7 @@ static char fmtbuf[MAX_FMT+1];
static const char *fixfmt(const char *format)
{
int i;
for(i=0; i<MAX_FMT && format[i]; i++) {
for(i=0; i<sizeof(fmtbuf)-1 && format[i]; i++) {
fmtbuf[i] = format[i];
if(format[i] == '%' && format[i+1] == 'L') {
fmtbuf[i+1] = 'l';