diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-13 05:51:48 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-13 05:51:48 +0000 |
| commit | cbf409d6e1b929e5bfd9b835c310b76c92521270 (patch) | |
| tree | cb8da238d53b5c9b07213697e5006c46ad8e0766 /util/nvmutil/nvmutil.c | |
| parent | 2ecee50da815268294db4a5d80881dc2f0417c18 (diff) | |
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>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 058657d9..811cce31 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1564,9 +1564,11 @@ rw_file_exact(int fd, uint8_t *mem, size_t len, 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) return -1; + + rc += (size_t)rv; } return rc; |
