[RTEMS Project] #2875: src/c/src/lib/libbsp/powerpc/shared/flash/flash.c:841: broken error checking ?
RTEMS trac
trac at rtems.org
Thu Jan 19 20:56:47 UTC 2017
#2875: src/c/src/lib/libbsp/powerpc/shared/flash/flash.c:841: broken error
checking ?
---------------------+------------------
Reporter: dcb | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 4.12
Component: General | Version: 4.11
Severity: normal | Keywords:
---------------------+------------------
src/c/src/lib/libbsp/powerpc/shared/flash/flash.c:841]: (style) Checking
if unsigned variable 'got' is less than zero.
Source code is
if ( got < 0 ) {
but
while ( (got = bfill(fd, buf, b->fblksz)) > 0 && sz ) {
and
uint32_t got;
with
static int
bfill(int fd, char *buf, int size)
Suggest use local variable of type int for the return value from bfill.
--
Ticket URL: <http://devel.rtems.org/ticket/2875>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list