From patchwork Sun Feb 28 00:48:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1445226 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=2620:52:3:1:0:246e:9693:128c; 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=sif4JQ6q; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4Dp4YX5dL3z9sCD for ; Sun, 28 Feb 2021 11:50:08 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 49F5A3894419; Sun, 28 Feb 2021 00:49:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49F5A3894419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614473371; bh=9XSFnxzlutuzpkVOnmw3fo/iM40tJH68o9e8DCWOKzA=; 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=sif4JQ6q60004QSJKWFoprdhR7XKQuDWO76QpzlcCKNrM2Wfq5m3GgL2644kE8o0a L9YQ7o8H+yvS6V+FEdP5jU3flrPYmLhNyTV4Rq3tZwgzOQAYqvF62jIvph+auobeyZ v7jCeNxr95DJ2MyVqDNtJjZPUyvuCxFqCFzA4+RE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 6EC8438930EE for ; Sun, 28 Feb 2021 00:49:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6EC8438930EE Received: by mail-wm1-x332.google.com with SMTP id o16so11021102wmh.0 for ; Sat, 27 Feb 2021 16:49:26 -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=9XSFnxzlutuzpkVOnmw3fo/iM40tJH68o9e8DCWOKzA=; b=Nj2xUrC5Elk//bWPT5JxC4YYGeFzw/IVBbs2mc3subcn22G4H80pmaMk7rWIjR0oAw i/vaqFXkXpeAxNkrQwF0ihzjRfWm96mHYiRlQAWCHBgibqSijn2GZykHhnbhQ1jp/LQe BkFsVDVLeVTiPV3bJhr7aeoUsn0BZhYI06p4FFcgjiMOfy0rDo+i4pjZ8lT+8A4MSR1N MomPNUiJ8wd5eMkPuPsN72gmr3o0IW2V8LKqQftPIGUMqoZXzndxupkBzzaXBh8bZJfk xyw+ec61LMCDfzITszuehYVz76ASPpuirH/8cQN/zaWcwtAJ8hUOLq+U64PJkBJrNGwN Noow== X-Gm-Message-State: AOAM530eR8DsXiqQCDq7HBK9yzvrEGceOu6U3/ZuMZGQ4LoArBLuf+M3 dghl36V9SsK39XBnQd4Cw1o= X-Google-Smtp-Source: ABdhPJx4/f/XF8++lBb2UThwIj0gMQQQkKlb46ql758YJHypVmYD/pUen5TaW5o5YRevZSbUzxW/Jw== X-Received: by 2002:a05:600c:d7:: with SMTP id u23mr8928618wmm.127.1614473365688; Sat, 27 Feb 2021 16:49:25 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id o14sm18212145wri.48.2021.02.27.16.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Feb 2021 16:49:25 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 10/14] getnameinfo.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sun, 28 Feb 2021 01:48:14 +0100 Message-Id: <20210228004817.122463-11-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, "G . Branden Robinson" , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in getnameinfo(). Let's use it here too. I conciously did an exception with respect to the right margin of the rendered page. Instead of having the right margin at 78 as usual (per Branden's recommendation), I let it use col 79 this time, to avoid breaking the prototype in an ugly way. .../glibc$ grep_glibc_prototype getnameinfo resolv/netdb.h:675: extern int getnameinfo (const struct sockaddr *__restrict __sa, socklen_t __salen, char *__restrict __host, socklen_t __hostlen, char *__restrict __serv, socklen_t __servlen, int __flags); .../glibc$ Cc: G. Branden Robinson Signed-off-by: Alejandro Colomar --- man3/getnameinfo.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3 index eff8b2562..d4d3f42e5 100644 --- a/man3/getnameinfo.3 +++ b/man3/getnameinfo.3 @@ -15,9 +15,11 @@ getnameinfo \- address-to-name translation in protocol-independent manner .B #include .B #include .PP -.BI "int getnameinfo(const struct sockaddr *" "addr" ", socklen_t " "addrlen" , -.BI " char *" "host" ", socklen_t " "hostlen" , -.BI " char *" "serv" ", socklen_t " "servlen" ", int " "flags" ); +.BI "int getnameinfo(const struct sockaddr *restrict " addr \ +", socklen_t " addrlen , +.BI " char *restrict " host ", socklen_t " hostlen , +.BI " char *restrict " serv ", socklen_t " servlen \ +", int " flags ); .fi .PP .RS -4