From: Alejandro Colomar Date: Wed, 10 Mar 2021 18:31:37 +0000 (+0100) Subject: strcat.3: SYNOPSIS: Use 'restrict' in prototypes X-Git-Tag: man-pages-5.11~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4f4e683e5c4b237df2549d6d77bfb1fa88de59b;p=thirdparty%2Fman-pages.git strcat.3: SYNOPSIS: Use 'restrict' in prototypes 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 Signed-off-by: Michael Kerrisk --- diff --git a/man3/strcat.3 b/man3/strcat.3 index d8e6716c43..821d57d74c 100644 --- a/man3/strcat.3 +++ b/man3/strcat.3 @@ -36,8 +36,9 @@ strcat, strncat \- concatenate two strings .nf .B #include .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