diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-05-20 14:55:30 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-05-20 18:16:06 +0200 |
commit | 70d0dda0c160cb1f9000a4da50baf27c63db51c8 (patch) | |
tree | d7ecf01ec837ed140abe523feac0f5f39eecb7ca /sysdeps/htl/sem-init.c | |
parent | 9ec31e57278ffc4e680ef03e75ce5b6b02e5edcf (diff) | |
download | glibc-70d0dda0c160cb1f9000a4da50baf27c63db51c8.tar.gz glibc-70d0dda0c160cb1f9000a4da50baf27c63db51c8.tar.xz glibc-70d0dda0c160cb1f9000a4da50baf27c63db51c8.zip |
htl: Use __hurd_fail () instead of assigning errno
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230520115531.3911877-2-bugaevc@gmail.com>
Diffstat (limited to 'sysdeps/htl/sem-init.c')
-rw-r--r-- | sysdeps/htl/sem-init.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sysdeps/htl/sem-init.c b/sysdeps/htl/sem-init.c index f04bbfdc77..f2954acd60 100644 --- a/sysdeps/htl/sem-init.c +++ b/sysdeps/htl/sem-init.c @@ -19,6 +19,7 @@ #include <semaphore.h> #include <errno.h> +#include <hurd.h> #include <pt-internal.h> int @@ -26,10 +27,7 @@ __sem_init (sem_t *sem, int pshared, unsigned value) { #ifdef SEM_VALUE_MAX if (value > SEM_VALUE_MAX) - { - errno = EINVAL; - return -1; - } + return __hurd_fail (EINVAL); #endif struct new_sem *isem = (struct new_sem *) sem; |