From patchwork Tue Jun 20 18:19:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Berat X-Patchwork-Id: 71449 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 190143857026 for ; Tue, 20 Jun 2023 18:22:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 190143857026 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687285335; bh=zTnbk/VeCzF5Wmn+kJKWzzEYLnCC4MbeEI8rJRvE5oE=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=UM4teW2aLue+2GAFU2XqG/6kIl7MBE9h0ENdsDZTQWTd4txuf2iddWdBMoG4Y/s30 a9ALCx0M4Cci8Ui2GeGcNQHMy6UoTLoeG668WU7rSQUBeqIQET5LOrDRJnh/uHFhDk 4FVyh1rMEnS8Fg4/sHlr2sn329pOpKLg5/bzt1NU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id BD97B385842B for ; Tue, 20 Jun 2023 18:19:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD97B385842B Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-647-Pt0nZqngOB2QxDNMTvbYKQ-1; Tue, 20 Jun 2023 14:19:40 -0400 X-MC-Unique: Pt0nZqngOB2QxDNMTvbYKQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3BC8B1039637; Tue, 20 Jun 2023 18:19:40 +0000 (UTC) Received: from Nymeria-redhat.redhat.com (unknown [10.39.193.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 91E50112132C; Tue, 20 Jun 2023 18:19:39 +0000 (UTC) To: libc-alpha@sourceware.org Cc: siddhesh@gotplt.org, fberat@redhat.com Subject: [PATCH 15/21] debug/readlink{, at}_chk.c: Harmonize declaration and definition Date: Tue, 20 Jun 2023 20:19:03 +0200 Message-ID: <20230620181910.1506893-16-fberat@redhat.com> In-Reply-To: <20230620181910.1506893-1-fberat@redhat.com> References: <20230620181910.1506893-1-fberat@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Fr=C3=A9d=C3=A9ric_B=C3=A9rat_via_Libc-alpha?= From: Frederic Berat Reply-To: =?utf-8?b?RnLDqWTDqXJpYyBCw6lyYXQ=?= Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The declaration and definition of these routines aren't consistent. Make the definition of __readlink_chk and __readlinkat_chk match the declaration of the routines they fortify. While there are no problems today this avoids any future potential problems related to the mismatch. Reviewed-by: Siddhesh Poyarekar --- debug/readlink_chk.c | 3 ++- debug/readlinkat_chk.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debug/readlink_chk.c b/debug/readlink_chk.c index c491db2225..99dea40c7b 100644 --- a/debug/readlink_chk.c +++ b/debug/readlink_chk.c @@ -24,7 +24,8 @@ ssize_t -__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) +__readlink_chk (const char *__restrict path, char *__restrict buf, size_t len, + size_t buflen) { if (len > buflen) __chk_fail (); diff --git a/debug/readlinkat_chk.c b/debug/readlinkat_chk.c index 03feac92ec..163dec8b80 100644 --- a/debug/readlinkat_chk.c +++ b/debug/readlinkat_chk.c @@ -20,7 +20,8 @@ ssize_t -__readlinkat_chk (int fd, const char *path, void *buf, size_t len, +__readlinkat_chk (int fd, const char *__restrict path, + char *__restrict buf, size_t len, size_t buflen) { if (len > buflen)