From patchwork Sun Feb 28 00:48:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 42172 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 5CA2D3894414; Sun, 28 Feb 2021 00:49:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CA2D3894414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614473372; bh=HpUxCBrOySQadu5LcVtJ9QANIHTX9RSvPEWM0EYfL58=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=T4ruyWOFQLBAKbWhCwvQ7UPOjjF87UFgG8zjGqNMEd10hxc8YWZGeBr4WNmFj4Uqb f4BWHJqZxxEnrxfRB2v2F8+pKK7h3WoM8cmRyaOHj2k5nfVdq4avApbYp1evcbzw3/ rYNPbDseucuXIU+6EejQtitUPb9Vlq3GQdizymq4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 1B5063893656 for ; Sun, 28 Feb 2021 00:49:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1B5063893656 Received: by mail-wr1-x42b.google.com with SMTP id d11so12272122wrj.7 for ; Sat, 27 Feb 2021 16:49:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HpUxCBrOySQadu5LcVtJ9QANIHTX9RSvPEWM0EYfL58=; b=qQrHB2b5D1g7HeReeFxXMgHzcYlpSLa+CjdGwy5fl64fdRKqiQccJd+UOFfFU5tCH9 UypOFJ/UhIHIOA1nw1NoOb82cJUDQ1e5l5UByZSjPXPD7jH4Nky7HugZG1R4nj4dJI3B E5TEJLnvSw7pz8ccHl9iB4Sjdn7vcPViEV8DEgSW6OefNSNPkmiVjHLS2T5Fap9ZlA2Y c1pBT25gl9bJTTzpYjaMDZ0xBm+MsH1WDvVo0tlINV6C99z4yC0/V3ggqMelLm0B6nSF A6caaTYkFTwdii+PUVQDaZoQQ5PcE9tc4lRYSRZH7VuqEf3YO1LLe0XYE88QurK+3S13 ldLQ== X-Gm-Message-State: AOAM532oWvrh80oDjDA4oRp3hvapnsKJo234iFediJjB7kGtZxxZHdB5 c1pNWDl8itjQ18bLUIuRqbs= X-Google-Smtp-Source: ABdhPJzzkO+LKPp7YVrs8y7IhFJUk3nvAu0ypi1uxirDE19v7v/TWvAP8q1wHXsHrsJvKDD50E68Kg== X-Received: by 2002:a5d:4ed1:: with SMTP id s17mr9741907wrv.402.1614473367262; Sat, 27 Feb 2021 16:49:27 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id o14sm18212145wri.48.2021.02.27.16.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Feb 2021 16:49:26 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 12/14] getprotoent_r.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sun, 28 Feb 2021 01:48:16 +0100 Message-Id: <20210228004817.122463-13-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210228004817.122463-1-alx.manpages@gmail.com> References: <20210228004817.122463-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" glibc uses 'restrict' in getprotoent_r(), getprotobyname_r(), getprotobynumber_r(). Let's use it here too. .../glibc$ grep_glibc_prototype getprotoent_r resolv/netdb.h:372: extern int getprotoent_r (struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); .../glibc$ grep_glibc_prototype getprotobyname_r resolv/netdb.h:376: extern int getprotobyname_r (const char *__restrict __name, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); .../glibc$ grep_glibc_prototype getprotobynumber_r resolv/netdb.h:381: extern int getprotobynumber_r (int __proto, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/getprotoent_r.3 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/man3/getprotoent_r.3 b/man3/getprotoent_r.3 index 55e37d0c9..651ec00c2 100644 --- a/man3/getprotoent_r.3 +++ b/man3/getprotoent_r.3 @@ -31,14 +31,17 @@ protocol entry (reentrant) .nf .B #include .PP -.BI "int getprotoent_r(struct protoent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct protoent **" result ); -.BI "int getprotobyname_r(const char *" name , -.BI " struct protoent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct protoent **" result ); +.BI "int getprotoent_r(struct protoent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct protoent **restrict " result ); +.BI "int getprotobyname_r(const char *restrict " name , +.BI " struct protoent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct protoent **restrict " result ); .BI "int getprotobynumber_r(int " proto , -.BI " struct protoent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct protoent **" result ); +.BI " struct protoent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct protoent **restrict " result ); .PP .fi .RS -4