From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687285183; 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: in-reply-to:in-reply-to:references:references; bh=zTnbk/VeCzF5Wmn+kJKWzzEYLnCC4MbeEI8rJRvE5oE=; b=WIjh83zFyCk0aG+Dw117o23qbjqLZpdhryE4DWWco4euVAxLVp8EAb+BfLCbf2iMnbofuL LkPX2+c7h9HEP5PhO9SJ7in1WSVc7qSe1ILgM7XTdRiAWWZA9LTfn2VXWsTouXto1DDBqI 9eI9omAm1qVXjGOfyRLj/zSPIM8WR54= 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) From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 List-Id: 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. --- 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) -- 2.41.0