From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id EDF991F454 for ; Fri, 8 Nov 2019 15:34:09 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=g+5 oJDNVDa3nXiNSo2s/i6wnfSmzfMlGiSmxJhbpcsJmX2DqIX+EuOfLgqUPcKjW5Zk q2/uCDNvBZSqz59OQdm80ppBsKEggDf/Paif7DMyqGTGt16jkYTmU5bAKGplclC/ ggeQap+8o7oncSHps0uL+YYtzeVc+nAun3eu5neU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=QV+qkUXbJ 6c3e0+zbOh2SGN3f6A=; b=oRaCLP988+57GjcrgXZz2jucSOnziVcmaPL8Y2bKi haDRgyybpX5aHRx8vgmv7Wg2zBzYL0tgjLaEYkzsMGMoVvRU9TLko6FIbK3hC/GH odtbebfdC0SWZu65LQy6407dEyBKBuclhEOAjYxQOld0nn/4/3+fApViVXWKw2zT x0= Received: (qmail 63637 invoked by alias); 8 Nov 2019 15:34:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 63622 invoked by uid 89); 8 Nov 2019 15:34:07 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-out.m-online.net From: Lukasz Majewski To: Joseph Myers , Paul Eggert Cc: Alistair Francis , Alistair Francis , GNU C Library , Adhemerval Zanella , Florian Weimer , Florian Weimer , Zack Weinberg , Carlos O'Donell , Lukasz Majewski Subject: [PATCH 1/2] linux: clock_settime: Remove check for nanoseconds validity Date: Fri, 8 Nov 2019 16:33:43 +0100 Message-Id: <20191108153344.10949-1-lukma@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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