From 2fda988da6e5f70da30d350ca9253f0d15008fc7 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 10 Mar 2026 06:11:31 +0000 Subject: util/nvmutil: make rc size_t (not ssize_t) i overlooked this when writing. it's comparing to a length which is size_t, so let's avoid an unnecessary cast. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 272091a6..d800ea39 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1335,7 +1335,7 @@ rw_file_exact(int fd, uint8_t *mem, size_t len, const char *rw_type_str) { ssize_t rval = -1; - ssize_t rc = 0; + size_t rc = 0; if (fd < 0) err(EIO, "%s: %s: Bad fd %d", path, rw_type_str, fd); @@ -1346,7 +1346,7 @@ rw_file_exact(int fd, uint8_t *mem, size_t len, "%s: %s: Requested length (%zu) exceeds SSIZE_MAX (%zd)", path, rw_type_str, len, SSIZE_MAX); - for (rc = 0; rc != (ssize_t)len; rc += rval) { + for (rc = 0; rc != len; rc += rval) { if (rw_type == PSCHREIB) rval = pwrite(fd, mem + rc, len - rc, off + rc); else if (rw_type == SCHREIB) -- cgit v1.2.1