mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +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
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user