From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id B20AF38930E3 for ; Sun, 28 Feb 2021 00:49:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B20AF38930E3 Received: by mail-wm1-x336.google.com with SMTP id u125so10988409wmg.4 for ; Sat, 27 Feb 2021 16:49:25 -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=tTgSAnxTLFjz9zOHsSmkUH18INVWp3rDvh8POrPDkU0=; b=QH/fOonYeUz7p16xUbpUf9i1f+3nRQgZ9giLPmVw8J84E6QSWpmhdW2RNkbKoj+4qM TpBnIJaPdBZQMuruibh0rmsfHCrY76FeIvMWPAC0I+POcjwT4LHlo9gOCM5UJrgArBSo SEFxunv92E3/hAiQCi0ffWx1zhbRmnrDmJSRi+NFLbMOT7PN048w9iD9PnH4jgwYhDEp sPdOzvIs30TtlH9a+HeSXbyf3y47mR8zwlCbhaXojoBLzOgQLSM5A4j2NFSjP6vF3Jr8 jDAyLYevEPsCedE3HkdQ27Hq/6tQza6ghJeRrPLfxoT0oULpI+5NAH/PGRh4M40XEI6P TOeQ== X-Gm-Message-State: AOAM532iR5OgXJP7gZ2H2XDPCB8W8dKSgcf7D3iqnPXK2rE0De5VEFaD OF5iuQMCrsGM0Xb8bp5wi80= X-Google-Smtp-Source: ABdhPJyijzHVj5WSVCsCJ2DdfGPebb3BqmTTJRU8jXjQzpJ65KbubghJJSh3or/t2/GG6Oh5lLWEaQ== X-Received: by 2002:a7b:c112:: with SMTP id w18mr4256261wmi.28.1614473364927; Sat, 27 Feb 2021 16:49:24 -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:24 -0800 (PST) From: Alejandro Colomar To: mtk.manpages@gmail.com Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: [PATCH 09/14] getmntent.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sun, 28 Feb 2021 01:48:13 +0100 Message-Id: <20210228004817.122463-10-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 Content-Transfer-Encoding: 8bit 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-List-Received-Date: Sun, 28 Feb 2021 00:49:27 -0000 glibc uses 'restrict' in addmntent(), getmntent_r(). Let's use it here too. .../glibc$ grep_glibc_prototype addmntent misc/mntent.h:81: extern int addmntent (FILE *__restrict __stream, const struct mntent *__restrict __mnt) __THROW; .../glibc$ grep_glibc_prototype getmntent_r misc/mntent.h:73: extern struct mntent *getmntent_r (FILE *__restrict __stream, struct mntent *__restrict __result, char *__restrict __buffer, int __bufsize) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/getmntent.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/man3/getmntent.3 b/man3/getmntent.3 index 7f83ed248..96e642d18 100644 --- a/man3/getmntent.3 +++ b/man3/getmntent.3 @@ -42,7 +42,8 @@ getmntent_r \- get filesystem descriptor file entry .PP .BI "struct mntent *getmntent(FILE *" stream ); .PP -.BI "int addmntent(FILE *" stream ", const struct mntent *" mnt ); +.BI "int addmntent(FILE *restrict " stream , +.BI " const struct mntent *restrict " mnt ); .PP .BI "int endmntent(FILE *" streamp ); .PP @@ -51,8 +52,9 @@ getmntent_r \- get filesystem descriptor file entry /* GNU extension */ .B #include .PP -.BI "struct mntent *getmntent_r(FILE *" streamp ", struct mntent *" mntbuf , -.BI " char *" buf ", int " buflen ); +.BI "struct mntent *getmntent_r(FILE *restrict " streamp , +.BI " struct mntent *restrict " mntbuf , +.BI " char *restrict " buf ", int " buflen ); .fi .PP .RS -4 -- 2.30.1.721.g45526154a5