Skip to content

Commit 0caed2f

Browse files
committed
- Remove extra file extensions
- return the negative of the return value
1 parent cbc1c33 commit 0caed2f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

libc/src/sys/mman/linux/remap_file_pages.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LLVM_LIBC_FUNCTION(int, remap_file_pages,
3030
// A negative return value indicates an error with the magnitude of the
3131
// value being the error code.
3232
if (ret < 0) {
33-
libc_errno = ret;
33+
libc_errno = -ret;
3434
return -1;
3535
}
3636

libc/test/src/sys/mman/linux/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ add_libc_unittest(
137137
DEPENDS
138138
libc.include.sys_mman
139139
libc.src.unistd.sysconf
140-
libc.test.UnitTest.Test
141140
libc.test.UnitTest.ErrnoSetterMatcher
142141
libc.src.sys.mman.remap_file_pages
143142
libc.src.errno.errno

0 commit comments

Comments
 (0)