This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] linux: clock_settime: Remove check for nanoseconds validity


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]