[libc-commits] [libc] [libc][fcntl] Simplify the handling of the return value from syscall … (PR #96325)
    Xu Zhang via libc-commits 
    libc-commits at lists.llvm.org
       
    Tue Jun 25 21:23:08 PDT 2024
    
    
  
================
@@ -162,4 +163,23 @@ TEST(LlvmLibcFcntlTest, UseAfterClose) {
   ASSERT_THAT(LIBC_NAMESPACE::close(fd), Succeeds(0));
   ASSERT_EQ(-1, LIBC_NAMESPACE::fcntl(fd, F_GETFL));
   ASSERT_ERRNO_EQ(EBADF);
+  LIBC_NAMESPACE::libc_errno = 0;
----------------
simonzgx wrote:
Okay, fixed. And I'm curious, is this just a matter of convention?
https://github.com/llvm/llvm-project/pull/96325
    
    
More information about the libc-commits
mailing list