This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] linux: clock_settime: Remove check for nanoseconds validity
- From: Alistair Francis <alistair23 at gmail dot com>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Paul Eggert <eggert at cs dot ucla dot edu>, 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>
- Date: Fri, 8 Nov 2019 08:20:49 -0800
- Subject: Re: [PATCH 1/2] linux: clock_settime: Remove check for nanoseconds validity
- References: <20191108153344.10949-1-lukma@denx.de>
On Fri, Nov 8, 2019 at 7:34 AM Lukasz Majewski <lukma@denx.de> wrote:
>
> 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.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> 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
>