]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
strcat.3: SYNOPSIS: Fix the size of 'dest'
authorAlejandro Colomar <alx@kernel.org>
Mon, 5 Dec 2022 15:09:47 +0000 (16:09 +0100)
committerAlejandro Colomar <alx@kernel.org>
Mon, 5 Dec 2022 15:09:49 +0000 (16:09 +0100)
I had a mistake when adding VLA syntax to this prototype.  From this
fixed prototype, it's visible how broken the design for this function
is.  Next move is to kill this function.

Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man3/strcat.3

index a4a376ba9e05d03854691878a8fe98a061c9dc34..61d3e54f182059b8514ee2a0b8647ed51b83d6ac 100644 (file)
@@ -20,9 +20,8 @@ Standard C library
 .B #include <string.h>
 .PP
 .BI "char *strcat(char *restrict " dest ", const char *restrict " src );
-.BI "char *strncat(char " dest "[restrict ." n "], \
-const char " src "[restrict ." n ],
-.BI "              size_t " n );
+.BI "char *strncat(char " dest "[restrict strlen(." dest ") + strnlen(." n ") + 1],"
+.BI "              const char " src "[restrict ." n "], size_t " n );
 .fi
 .SH DESCRIPTION
 The