[hurd,commited] hurd: adjtime: on error return -1 and set errno

Samuel Thibault <[email protected]>
Newsgroups gmane.os.hurd.cvs,gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
From: Diego Nieto Cid <[email protected]>

  * sysdeps/mach/hurd/adjtime.c: use __hurd_fail to return
    errors back to the caller.
Message-ID: <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.