[hurd,commited] hurd: adjtime: on error return -1 and set errno
Samuel Thibault
samuel.thibault@ens-lyon.org
Wed May 27 12:19:11 GMT 2026
From: Diego Nieto Cid <dnietoc@gmail.com>
* sysdeps/mach/hurd/adjtime.c: use __hurd_fail to return
errors back to the caller.
Message-ID: <20260527014103.10791-1-dnietoc@gmail.com>
---
sysdeps/mach/hurd/adjtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/mach/hurd/adjtime.c b/sysdeps/mach/hurd/adjtime.c
index 4408b1cff5..762fdeb4a3 100644
--- a/sysdeps/mach/hurd/adjtime.c
+++ b/sysdeps/mach/hurd/adjtime.c
@@ -39,7 +39,7 @@ __adjtime (const struct timeval *delta, struct timeval *olddelta)
{
if (delta->tv_usec >= TIME_MICROS_MAX ||
delta->tv_usec <= -TIME_MICROS_MAX)
- return EINVAL;
+ return __hurd_fail (EINVAL);
rpc_delta.seconds = delta->tv_sec;
rpc_delta.microseconds = delta->tv_usec;
@@ -55,7 +55,7 @@ __adjtime (const struct timeval *delta, struct timeval *olddelta)
rpc_delta.microseconds = MACH_ADJTIME_USECS_OMIT;
}
#else
- return EINVAL;
+ return __hurd_fail (EINVAL);
#endif
err = __host_adjust_time (hostpriv, rpc_delta, &rpc_olddelta);
--
2.53.0
More information about the Libc-alpha
mailing list