[libc-commits] [libc] e75cce7 - [libc] Fix typo in lseek syscall number macro.

Siva Chandra Reddy via libc-commits libc-commits at lists.llvm.org
Wed Aug 31 10:58:40 PDT 2022


Author: Dong-hee Na
Date: 2022-08-31T17:50:24Z
New Revision: e75cce76ab8638ea4a2f19e31b15917e46ea6829

URL: https://github.com/llvm/llvm-project/commit/e75cce76ab8638ea4a2f19e31b15917e46ea6829
DIFF: https://github.com/llvm/llvm-project/commit/e75cce76ab8638ea4a2f19e31b15917e46ea6829.diff

LOG: [libc] Fix typo in lseek syscall number macro.

Differential Revision: https://reviews.llvm.org/D133022

Added: 
    

Modified: 
    libc/src/__support/File/linux_file.cpp
    libc/src/unistd/linux/lseek.cpp

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/File/linux_file.cpp b/libc/src/__support/File/linux_file.cpp
index eb2a90c089462..98abb6e1f64a8 100644
--- a/libc/src/__support/File/linux_file.cpp
+++ b/libc/src/__support/File/linux_file.cpp
@@ -77,7 +77,7 @@ int seek_func(File *f, long offset, int whence) {
   long ret = __llvm_libc::syscall(SYS_lseek, lf->get_fd(), offset, whence);
 #elif defined(SYS__llseek)
   long result;
-  long ret = __llvm_libc::syscall(SYS__lseek, lf->get_fd(), offset >> 32,
+  long ret = __llvm_libc::syscall(SYS__llseek, lf->get_fd(), offset >> 32,
                                   offset, &result, whence);
 #else
 #error "lseek and _llseek syscalls not available to perform a seek operation."

diff  --git a/libc/src/unistd/linux/lseek.cpp b/libc/src/unistd/linux/lseek.cpp
index 559673f3f4370..4afddd37c695b 100644
--- a/libc/src/unistd/linux/lseek.cpp
+++ b/libc/src/unistd/linux/lseek.cpp
@@ -23,8 +23,8 @@ LLVM_LIBC_FUNCTION(off_t, lseek, (int fd, off_t offset, int whence)) {
   long ret = __llvm_libc::syscall(SYS_lseek, fd, offset, whence);
   result = ret;
 #elif defined(SYS__llseek)
-  long ret = __llvm_libc::syscall(SYS__lseek, fd, offset >> 32, offset, &result,
-                                  whence);
+  long ret = __llvm_libc::syscall(SYS__llseek, fd, offset >> 32, offset,
+                                  &result, whence);
 #else
 #error "lseek and _llseek syscalls not available."
 #endif


        


More information about the libc-commits mailing list