Message ID | 20210310183149.194717-12-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=f+spDf6k; 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 4DwggK0l52z9sS8 for <incoming@patchwork.ozlabs.org>; Thu, 11 Mar 2021 05:33:01 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28D653987C3C; Wed, 10 Mar 2021 18:32:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28D653987C3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401141; bh=HEdE9FOWc9j3Y4cTJGMR/JWcdWsgHEC/wWTIgs2wasE=; 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=f+spDf6kQCxXUA1UB3Kzb8ULFQzDetVTudu3Nl0FC4CiCaUL1pz+a9gTl1A2uYbOw gB4/CPabE4X5PET3Gz1sbQhwR4nV/mdAZgTBNFTe2xAPTihdZyzEekCqFjw+PcgndR 04pg2uF12aA5l9KqnfC42PdOfWNP73h5FUgjUWg4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 2E79B3987C26 for <libc-alpha@sourceware.org>; Wed, 10 Mar 2021 18:32:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2E79B3987C26 Received: by mail-wm1-x32e.google.com with SMTP id n11-20020a05600c4f8bb029010e5cf86347so1942846wmq.1 for <libc-alpha@sourceware.org>; Wed, 10 Mar 2021 10:32: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=HEdE9FOWc9j3Y4cTJGMR/JWcdWsgHEC/wWTIgs2wasE=; b=qLK7OiiETDcowDvoUWQ/I3zluEQOIA2OwF0R+umkD5ZFlj7AsUAnA9NnoC38HZxOOb ae+1ZtuBx9fy09IC1nMnFEuZOJTiIRzu8Ab3D/ETKWb2UDKwYWPGA28gX7J2+Xa9kXml E5XU76WraBLLCRi6/b6iiQQW2JO4fxfaswep5dbkAJfPyJpeBUhyxhoz0qIptVZJje+I Ht0E8N0yR0IH6kzpFtyKLvFqMwJGmf479jKQqXskDDk7acxoOP7nWpRytfovC+38RqHp Fkgrg90Y+/Qjv73HqDX2QQRXqwUDzBzNbUzjzbjL5yjCCYwWWhsengPXbtBCsQj26CSt YYFA== X-Gm-Message-State: AOAM530twpfb4KzaNC4Q6O9sgSq/t1wtY4OzOTs/m8Pm0fht4/QsmWpm UELBFigGsNjhPlcdukg/IiU= X-Google-Smtp-Source: ABdhPJwm940RjcvLN8659kPWDDEVsB6xQ14r2MqMil/UJEb3RuZbXmKuDQLUG3a3qGSUcSCFzyUOIg== X-Received: by 2002:a05:600c:1405:: with SMTP id g5mr4576024wmi.140.1615401135402; Wed, 10 Mar 2021 10:32:15 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:15 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 11/24] strcat.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:37 +0100 Message-Id: <20210310183149.194717-12-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-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 5)
|
expand
|
diff --git a/man3/strcat.3 b/man3/strcat.3 index d8e6716c4..821d57d74 100644 --- a/man3/strcat.3 +++ b/man3/strcat.3 @@ -36,8 +36,9 @@ strcat, strncat \- concatenate two strings .nf .B #include <string.h> .PP -.BI "char *strcat(char *" dest ", const char *" src ); -.BI "char *strncat(char *" dest ", const char *" src ", size_t " n ); +.BI "char *strcat(char *restrict " dest ", const char *restrict " src ); +.BI "char *strncat(char *restrict " dest ", const char *restrict " src \ +", size_t " n ); .fi .SH DESCRIPTION The
Both POSIX and glibc use 'restrict' in strcat(), strncat(). Let's use it here too. .../glibc$ grep_glibc_prototype strcat string/string.h:133: extern char *strcat (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype strncat string/string.h:136: extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> --- man3/strcat.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)