public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] linux: timerfd_gettime minor cleanup
@ 2021-06-22 15:11 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2021-06-22 15:11 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4b6551902e5c701e5f3156928d88aadeb6487dc1

commit 4b6551902e5c701e5f3156928d88aadeb6487dc1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jun 15 22:59:22 2021 -0300

    linux: timerfd_gettime minor cleanup
    
    The __NR_timerfd_gettime64 is always defined.
    
    Reviewed-by: Lukasz Majewski <lukma@denx.de>

Diff:
---
 sysdeps/unix/sysv/linux/timerfd_gettime.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/timerfd_gettime.c b/sysdeps/unix/sysv/linux/timerfd_gettime.c
index 89f8066b91..df2359990e 100644
--- a/sysdeps/unix/sysv/linux/timerfd_gettime.c
+++ b/sysdeps/unix/sysv/linux/timerfd_gettime.c
@@ -25,17 +25,16 @@
 int
 __timerfd_gettime64 (int fd, struct __itimerspec64 *value)
 {
+#ifndef __NR_timerfd_gettime64
+# define __NR_timerfd_gettime64 __NR_timerfd_gettime
+#endif
+
 #ifdef __ASSUME_TIME64_SYSCALLS
-# ifndef __NR_timerfd_gettime64
-#  define __NR_timerfd_gettime64 __NR_timerfd_gettime
-# endif
   return INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
 #else
-# ifdef __NR_timerfd_gettime64
   int ret = INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
   if (ret == 0 || errno != ENOSYS)
     return ret;
-# endif
   struct itimerspec its32;
   int retval = INLINE_SYSCALL_CALL (timerfd_gettime, fd, &its32);
   if (retval == 0)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-22 15:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 15:11 [glibc] linux: timerfd_gettime minor cleanup Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).