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 <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-03-10 19:31:37 +01:00 committed by Michael Kerrisk
parent 36addc2d59
commit e4f4e683e5
1 changed files with 3 additions and 2 deletions

View File

@ -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