浏览代码

LibCore: Fix invalid errno

Noone seems to check 'errno' when using LibCore, but let's make sure it's correct anyway.
Ben Wiederhake 4 年之前
父节点
当前提交
6f607742dd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibCore/File.cpp

+ 1 - 1
Userland/Libraries/LibCore/File.cpp

@@ -209,7 +209,7 @@ String File::read_link(const StringView& link_path)
         return { large_buffer_ptr, new_size };
         return { large_buffer_ptr, new_size };
     // Otherwise, here's not much we can do, unless we want to loop endlessly
     // Otherwise, here's not much we can do, unless we want to loop endlessly
     // in this case. Let's leave it up to the caller whether to loop.
     // in this case. Let's leave it up to the caller whether to loop.
-    errno = -EAGAIN;
+    errno = EAGAIN;
     return {};
     return {};
 }
 }