Skip to content

Commit

Permalink
Fix not using the return variable
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail R. Gadelha <[email protected]>
  • Loading branch information
mikhailramalho committed Oct 4, 2023
1 parent 60401c1 commit fa414cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions libc/src/unistd/linux/pread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ LLVM_LIBC_FUNCTION(ssize_t, pread,
// This is a 32-bit system with a 64-bit offset.
long offset_low = static_cast<long>(offset);
long offset_high = static_cast<long>(offset >> 32);
ssize_t ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(
SYS_pread64, fd, buf, count, offset_low, offset_high);
ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pread64, fd, buf, count,
offset_low, offset_high);
} else {
ssize_t ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pread64, fd, buf,
count, offset);
ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pread64, fd, buf, count,
offset);
}

if (ret < 0) {
Expand Down
8 changes: 4 additions & 4 deletions libc/src/unistd/linux/pwrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ LLVM_LIBC_FUNCTION(ssize_t, pwrite,
// This is a 32-bit system with a 64-bit offset.
long offset_low = static_cast<long>(offset);
long offset_high = static_cast<long>(offset >> 32);
ssize_t ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(
SYS_pwrite64, fd, buf, count, offset_low, offset_high);
ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pwrite64, fd, buf, count,
offset_low, offset_high);
} else {
ssize_t ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pwrite64, fd, buf,
count, offset);
ret = LIBC_NAMESPACE::syscall_impl<ssize_t>(SYS_pwrite64, fd, buf, count,
offset);
}

if (ret < 0) {
Expand Down

0 comments on commit fa414cb

Please sign in to comment.