This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 1/2] linux: clock_settime: Remove check for nanoseconds validity
- From: Lukasz Majewski <lukma at denx dot de>
- To: Joseph Myers <joseph at codesourcery dot com>, Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Alistair Francis <alistair23 at gmail dot com>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Florian Weimer <fweimer at redhat dot com>, Florian Weimer <fw at deneb dot enyo dot de>, Zack Weinberg <zackw at panix dot com>, Carlos O'Donell <carlos at redhat dot com>, Lukasz Majewski <lukma at denx dot de>
- Date: Fri, 8 Nov 2019 16:33:43 +0100
- Subject: [PATCH 1/2] linux: clock_settime: Remove check for nanoseconds validity
The check if passed nanoseconds via struct __timespec64's *tp pointer is
also performed in the Linux kernel. Remove it from glibc to avoid
duplication.
---
sysdeps/unix/sysv/linux/clock_settime.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/clock_settime.c b/sysdeps/unix/sysv/linux/clock_settime.c
index bda113809b..6706dbb31f 100644
--- a/sysdeps/unix/sysv/linux/clock_settime.c
+++ b/sysdeps/unix/sysv/linux/clock_settime.c
@@ -25,13 +25,6 @@
int
__clock_settime64 (clockid_t clock_id, const struct __timespec64 *tp)
{
- /* Make sure the time cvalue is OK. */
- if (! valid_nanoseconds (tp->tv_nsec))
- {
- __set_errno (EINVAL);
- return -1;
- }
-
#ifdef __ASSUME_TIME64_SYSCALLS
# ifndef __NR_clock_settime64
# define __NR_clock_settime64 __NR_clock_settime
--
2.20.1