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:
Leah Rowe
2026-03-13 05:51:48 +00:00
parent 1dbd679c0c
commit a0ca693d42
+3 -1
View File
@@ -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;