Skip to content

Commit fa414cb

Browse files
Fix not using the return variable
Signed-off-by: Mikhail R. Gadelha <[email protected]>
1 parent 60401c1 commit fa414cb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

libc/src/unistd/linux/pread.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ LLVM_LIBC_FUNCTION(ssize_t, pread,
2424
// This is a 32-bit system with a 64-bit offset.
2525
long offset_low = static_cast<long>(offset);
2626
long offset_high = static_cast<long>(offset >> 32);
27-
ssize_t ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(
28-
SYS_pread64, fd, buf, count, offset_low, offset_high);
27+
ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pread64, fd, buf, count,
28+
offset_low, offset_high);
2929
} else {
30-
ssize_t ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pread64, fd, buf,
31-
count, offset);
30+
ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pread64, fd, buf, count,
31+
offset);
3232
}
3333

3434
if (ret < 0) {

libc/src/unistd/linux/pwrite.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ LLVM_LIBC_FUNCTION(ssize_t, pwrite,
2525
// This is a 32-bit system with a 64-bit offset.
2626
long offset_low = static_cast<long>(offset);
2727
long offset_high = static_cast<long>(offset >> 32);
28-
ssize_t ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(
29-
SYS_pwrite64, fd, buf, count, offset_low, offset_high);
28+
ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pwrite64, fd, buf, count,
29+
offset_low, offset_high);
3030
} else {
31-
ssize_t ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pwrite64, fd, buf,
32-
count, offset);
31+
ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pwrite64, fd, buf, count,
32+
offset);
3333
}
3434

3535
if (ret < 0) {

0 commit comments

Comments
 (0)