From 4240183fa1481ea00a0c4b51e490ac046ed90542 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Fri, 21 Feb 2025 02:33:40 +0200 Subject: [PATCH] fix(userspace/libc): cast status to int in __check_errno for proper error handling Signed-off-by: EnderIce2 --- Userspace/libc/src/std/errno.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userspace/libc/src/std/errno.c b/Userspace/libc/src/std/errno.c index 2200f0e2..6318bea1 100644 --- a/Userspace/libc/src/std/errno.c +++ b/Userspace/libc/src/std/errno.c @@ -21,9 +21,9 @@ __iptr __check_errno(__iptr status, __iptr err) { - if (status >= EOK) + if ((int)status >= EOK) return status; - pthread_self()->CurrentError = status; + pthread_self()->CurrentError = (int)status; return err; }