diff options
author | Alejandro Colomar <alx@kernel.org> | 2022-12-05 16:09:47 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2022-12-05 16:09:49 +0100 |
commit | 7c19ad66c8e990a46d4e4d4daff8002a7a584431 (patch) | |
tree | 6af82f8bb3b0b4f4d042f25ca504a13cfd8a83f5 | |
parent | 2d251a70f6c064a6845a84e2187ccb23b72ede75 (diff) |
strcat.3: SYNOPSIS: Fix the size of 'dest'
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>
-rw-r--r-- | man3/strcat.3 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/man3/strcat.3 b/man3/strcat.3 index a4a376ba9..61d3e54f1 100644 --- a/man3/strcat.3 +++ b/man3/strcat.3 @@ -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 |