From patchwork Fri Mar 5 23:50:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448296 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=g4yx6riF; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dskz15RFkz9sVt for ; Sat, 6 Mar 2021 10:51:25 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5706D383E826; Fri, 5 Mar 2021 23:51:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5706D383E826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988279; bh=mSn3yoW/12Ru/TyYcPhA2gU0BhlZA9Vvk34Eo3ralpo=; 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=g4yx6riFCMiu22yieVUqJtIgP6k+RF0iTZbQzXg1nmbtU8LKHTW9EdKn6zRXsv9Mh 860rlaHawviWKUz4RRxpuR02WdxFoA4cXz7l1ZcawBIWU7JRKjFwKG8nw08emjVddL KEA2glyt9wORW2DovULxNJgLS5cQOiqytvpA0Bhc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 924F33854838 for ; Fri, 5 Mar 2021 23:51:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 924F33854838 Received: by mail-wr1-x433.google.com with SMTP id b18so3922439wrn.6 for ; Fri, 05 Mar 2021 15:51:16 -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=mSn3yoW/12Ru/TyYcPhA2gU0BhlZA9Vvk34Eo3ralpo=; b=UpM8STrnTZmRqwzU0qAYxuknU6SGqnhkyD3yNy3+2Wm5ukf1j6gtrKo2S7BJdNwqmc bMtz2MqJ8jbcOXm5eJPD4TrZSiFEfZf9ZaOFBAbREf9OHh36R61R96UIhp0t1/LEMUD9 S1KA9cPZC2m0zLVPrrhJBwaJJae1fDBxsEsd1eZVTlbc4JzZ3zH/AM7pyi1G0qYdnkZ4 rhpGv9vWo28OrjTzyJq6Pf0bqtpm0kGN8Oz7skmnsCNdQJMDJoPEMEpsqgALW1RoW1GT +hYwktyayhV2IarSAo/mQ5bigW8zkAKh/nJJrtWyFP3OiFIGAfB+iKA9Mr9GO3FQ9JQ1 nNSg== X-Gm-Message-State: AOAM530f3XR6oFUVcRbw7sy4UnP1sPuAyafjYZURg7nlmPXsmEH9Sins 1EExKapiZstffRQqRxVOtEc= X-Google-Smtp-Source: ABdhPJxz8dmAiGiXgh5BHG+FQX5lcOw5izdwL1BoaTyvNmc+ToArcYmn6P0Mq4mr30VFuK9tmwsQ+w== X-Received: by 2002:adf:e5c4:: with SMTP id a4mr11617321wrn.174.1614988275785; Fri, 05 Mar 2021 15:51:15 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:15 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 01/22] getservent_r.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:45 +0100 Message-Id: <20210305235105.177359-2-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 getservent_r(), getservbyname_r(), getservbyport_r(). Let's use it here too. .../glibc$ grep_glibc_prototype getservent_r resolv/netdb.h:306: extern int getservent_r (struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); .../glibc$ grep_glibc_prototype getservbyname_r resolv/netdb.h:310: extern int getservbyname_r (const char *__restrict __name, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); .../glibc$ grep_glibc_prototype getservbyport_r resolv/netdb.h:316: extern int getservbyport_r (int __port, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/getservent_r.3 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/man3/getservent_r.3 b/man3/getservent_r.3 index ad7fd22e4..c73a93afc 100644 --- a/man3/getservent_r.3 +++ b/man3/getservent_r.3 @@ -31,14 +31,19 @@ service entry (reentrant) .nf .B #include .PP -.BI "int getservent_r(struct servent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct servent **" result ); -.BI "int getservbyname_r(const char *" name ", const char *" proto , -.BI " struct servent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct servent **" result ); -.BI "int getservbyport_r(int " port ", const char *" proto , -.BI " struct servent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct servent **" result ); +.BI "int getservent_r(struct servent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct servent **restrict " result ); +.BI "int getservbyname_r(const char *restrict " name , +.BI " const char *restrict " proto , +.BI " struct servent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct servent **restrict " result ); +.BI "int getservbyport_r(int " port , +.BI " const char *restrict " proto , +.BI " struct servent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct servent **restrict " result ); .PP .fi .RS -4