diff options
author | Tim Schumacher <timschumi@gmx.de> | 2021-05-30 17:26:24 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-30 19:37:32 +0200 |
commit | d5bf9182dd2d2678dc43f38109282850c63bd63a (patch) | |
tree | aed71d3f0bd022d119d811c057ae9a7fca5c0216 /Userland/Libraries/LibC | |
parent | 01c75e3a34c463230583ac7979164159ad8ed306 (diff) | |
download | serenity-d5bf9182dd2d2678dc43f38109282850c63bd63a.zip |
LibC: Don't clear errno on success
POSIX (`errno(3p)`) states that errno should not be set to zero.
This helps with applications that don't expect errno to get updated
unless an intermediate syscall also fails.
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r-- | Userland/Libraries/LibC/errno.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/errno.h b/Userland/Libraries/LibC/errno.h index 6759595e84..449d6d2bdb 100644 --- a/Userland/Libraries/LibC/errno.h +++ b/Userland/Libraries/LibC/errno.h @@ -15,7 +15,6 @@ errno = -rc; \ return (bad_ret); \ } \ - errno = 0; \ return (good_ret); \ } while (0) |