From patchwork Thu Mar 5 11:57:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 38426 Received: (qmail 66883 invoked by alias); 5 Mar 2020 11:57:22 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 66875 invoked by uid 89); 5 Mar 2020 11:57:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583409439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GN+xe5ANgYDItQOsna+cqWEL+VGsq8sEX+gjrvH1irw=; b=h4otuhyLLteYW8PPswe/JTJmCKriJlFbBjoVD5FGRIF5bmQvjCnpZdF7Sfbd1XJn3AqOY5 ptvsgoVDNP9QqAPq1sT4nbSxTrGhSFAUsjuw1FsaYNAhJZASA084xzCrI58UbTZ0RWq+0K 8Ne1HUEbvhP6Kv623HmwzuoiXHsnYts= From: Florian Weimer To: libc-alpha@sourceware.org Cc: Lukasz Majewski , Adhemerval Zanella Subject: [PATCH] Linux: Use AT_FDCWD in utime, utimes when calling utimensat Date: Thu, 05 Mar 2020 12:57:12 +0100 Message-ID: <87sgin9fqf.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 0 is a valid descriptor without any special meaning. ----- sysdeps/unix/sysv/linux/utime.c | 2 +- sysdeps/unix/sysv/linux/utimes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/utime.c b/sysdeps/unix/sysv/linux/utime.c index 2cd9334a6f..6516344adc 100644 --- a/sysdeps/unix/sysv/linux/utime.c +++ b/sysdeps/unix/sysv/linux/utime.c @@ -32,7 +32,7 @@ __utime64 (const char *file, const struct __utimbuf64 *times) ts64[1].tv_nsec = 0LL; } - return __utimensat64_helper (0, file, times ? ts64 : NULL, 0); + return __utimensat64_helper (AT_FDCWD, file, times ? ts64 : NULL, 0); } #if __TIMESIZE != 64 diff --git a/sysdeps/unix/sysv/linux/utimes.c b/sysdeps/unix/sysv/linux/utimes.c index 75927b6ec6..02a5e91415 100644 --- a/sysdeps/unix/sysv/linux/utimes.c +++ b/sysdeps/unix/sysv/linux/utimes.c @@ -29,7 +29,7 @@ __utimes64 (const char *file, const struct __timeval64 tvp[2]) ts64[1] = timeval64_to_timespec64 (tvp[1]); } - return __utimensat64_helper (0, file, tvp ? ts64 : NULL, 0); + return __utimensat64_helper (AT_FDCWD, file, tvp ? ts64 : NULL, 0); } #if __TIMESIZE != 64