mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: increment rc at end of rw_file_exact
for fussy static analysers and/or compilers Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1564,9 +1564,11 @@ rw_file_exact(int fd, uint8_t *mem, size_t len,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (rc = 0, rv = 0; rc < len; rc += (size_t)rv) {
|
for (rc = 0, rv = 0; rc < len; ) {
|
||||||
if ((rv = rw_file_once(fd, mem, len, off, rw_type, rc)) == -1)
|
if ((rv = rw_file_once(fd, mem, len, off, rw_type, rc)) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
rc += (size_t)rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
Reference in New Issue
Block a user