From 8ac649e2aabf196e57478df6f1bcfc1754adfc62 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 21 Oct 2023 13:57:25 +0200 Subject: [PATCH] unix: rename variable for consistency uv__fs_write_do() calls it `r` so call it that in `uv__fs_read_do()` too. --- src/unix/fs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index 0403e268..3081cb24 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -407,28 +407,28 @@ static ssize_t uv__fs_read_do(int fd, unsigned int nbufs, int64_t off) { unsigned int iovmax; - ssize_t result; + ssize_t r; iovmax = uv__getiovmax(); if (nbufs > iovmax) nbufs = iovmax; - result = 0; + r = 0; if (off < 0) { if (nbufs == 1) - result = read(fd, bufs->iov_base, bufs->iov_len); + r = read(fd, bufs->iov_base, bufs->iov_len); else if (nbufs > 1) - result = readv(fd, bufs, nbufs); + r = readv(fd, bufs, nbufs); } else { if (nbufs == 1) - result = pread(fd, bufs->iov_base, bufs->iov_len, off); + r = pread(fd, bufs->iov_base, bufs->iov_len, off); else if (nbufs > 1) - result = preadv(fd, bufs, nbufs, off); + r = preadv(fd, bufs, nbufs, off); } #ifdef __PASE__ /* PASE returns EOPNOTSUPP when reading a directory, convert to EISDIR */ - if (result == -1 && errno == EOPNOTSUPP) { + if (r == -1 && errno == EOPNOTSUPP) { struct stat buf; ssize_t rc; rc = uv__fstat(fd, &buf); @@ -438,7 +438,7 @@ static ssize_t uv__fs_read_do(int fd, } #endif - return result; + return r; }