1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:07:45 +00:00

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.
This commit is contained in:
Tim Schumacher 2021-05-30 17:26:24 +02:00 committed by Andreas Kling
parent 01c75e3a34
commit d5bf9182dd

View file

@ -15,7 +15,6 @@
errno = -rc; \
return (bad_ret); \
} \
errno = 0; \
return (good_ret); \
} while (0)