summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2021-05-30 17:26:24 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-30 19:37:32 +0200
commitd5bf9182dd2d2678dc43f38109282850c63bd63a (patch)
treeaed71d3f0bd022d119d811c057ae9a7fca5c0216 /Userland/Libraries/LibC
parent01c75e3a34c463230583ac7979164159ad8ed306 (diff)
downloadserenity-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.h1
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)