Message ID | 20210305235105.177359-17-alx.manpages@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces@sourceware.org> 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=<UNKNOWN>) 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=oO/i8/v8; 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 4Dsl0G5ZVXz9sVt for <incoming@patchwork.ozlabs.org>; Sat, 6 Mar 2021 10:52:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9B80399F00D; Fri, 5 Mar 2021 23:51:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9B80399F00D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988293; bh=KdxOyC9Hv0CB7JvZPjCKcFOH0+O/XDEKOUtz7Jr6yfQ=; 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=oO/i8/v830fMuceROtCtN0fN8X6pXeihP6uTpNQmrOCT1hSJvFjvS16q6slfdEivm kjaPEp49N0qi8cplDukgKjcHV07DI5L3yWTSkvI+MVtXW1vaD04fc5xj+q4wRoRso/ 2mmJZcvrjfck60kPsbxSBpNhls5r3/kj1MxIfBOI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 6E03C399C03D for <libc-alpha@sourceware.org>; Fri, 5 Mar 2021 23:51:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6E03C399C03D Received: by mail-wr1-x42e.google.com with SMTP id u14so3936823wri.3 for <libc-alpha@sourceware.org>; Fri, 05 Mar 2021 15:51:29 -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=KdxOyC9Hv0CB7JvZPjCKcFOH0+O/XDEKOUtz7Jr6yfQ=; b=NfP9YqNyzAcfSunqq+QFJSbAczdAnC4HVmU2W/95GVCEAR9jMMjFp29hLjYHRBiYKq vERoY8yMhunzSXJtndJoOBGp52LwJHR9OKkhj1gKv8sS/cZEA6XhjWXTxpc4YarZfE/T LTy7hIgcMmEnqjGgls/Cy8odO4o7D6Q9GKTmm89MC4gRKIWqEXKqgtQGkyFRGsydQQTk zuGlaqwoYDEBTleySdqfthqOTfo+ZLlzq4qxqhjPf/YLHnI2rjXKH/lbRqeR4TjXQPGs u3ighvKDWLn9w33l+XsC9y7eFHxXV36UjbKW/tlofmMi8WEPC+t2fUG/fCrbuRFPKsUb PYDQ== X-Gm-Message-State: AOAM533qNN3W+zCdvx9XtnnJFQ2zBBdI2O0KUEomYFU1/Yri/m7xZEXH Rr+LkMwUOcfWQPaeRjsF2xaBB9xvNrUTnQ== X-Google-Smtp-Source: ABdhPJw0QMYG8jYcDbtSve1101RhLNVhimdPnrcXSi1RSqKVyRHrKFynbF6R2JP1Ni58t7+Qm5e81g== X-Received: by 2002:adf:b313:: with SMTP id j19mr11377163wrd.188.1614988288677; Fri, 05 Mar 2021 15:51:28 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:28 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 16/22] mempcpy.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:51:00 +0100 Message-Id: <20210305235105.177359-17-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Alejandro Colomar via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Alejandro Colomar <alx.manpages@gmail.com> Cc: Alejandro Colomar <alx.manpages@gmail.com>, linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
man3: SYNOPSIS: Use 'restrict' in prototypes (batch 3)
|
expand
|
diff --git a/man3/mempcpy.3 b/man3/mempcpy.3 index 33c032c50..8a810e6a5 100644 --- a/man3/mempcpy.3 +++ b/man3/mempcpy.3 @@ -15,12 +15,15 @@ mempcpy, wmempcpy \- copy memory area .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <string.h> .PP -.BI "void *mempcpy(void *" dest ", const void *" src ", size_t " n ); +.BI "void *mempcpy(void *restrict " dest ", const void *restrict " src \ +", size_t " n ); .PP .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <wchar.h> .PP -.BI "wchar_t *wmempcpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n ); +.BI "wchar_t *wmempcpy(wchar_t *restrict " dest \ +", const wchar_t *restrict " src , +.BI " size_t " n ); .fi .SH DESCRIPTION The
glibc uses 'restrict' in mempcpy(), wmempcpy(). Let's use it here too. .../glibc$ grep_glibc_prototype mempcpy string/string.h:384: extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype wmempcpy wcsmbs/wchar.h:276: extern wchar_t *wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> --- man3/mempcpy.3 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)