diff options
| author | Alejandro Colomar <alx@kernel.org> | 2023-11-21 16:21:55 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-11-21 19:30:47 +0100 |
| commit | cfa4c15e270f96e08609fff2e913dce34eb3d248 (patch) | |
| tree | 14f4426a0968c19e09561eead2e7a32f8d345f01 /man3 | |
| parent | 94622c3fc5056ab8081cd086af98a76aec68339e (diff) | |
| download | man-pages-cfa4c15e270f96e08609fff2e913dce34eb3d248.tar.gz | |
strncat.3: Rename third parameter to ssize
This better clarifies that the size is of src.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man3')
| -rw-r--r-- | man3/strncat.3 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/man3/strncat.3 b/man3/strncat.3 index 2f17e2b77d..fb272ca4ce 100644 --- a/man3/strncat.3 +++ b/man3/strncat.3 @@ -13,8 +13,8 @@ Standard C library .nf .B #include <string.h> .P -.BI "char *strncat(char *restrict " dst ", const char " src "[restrict ." sz ], -.BI " size_t " sz ); +.BI "char *strncat(char *restrict " dst ", const char " src "[restrict ." ssize ], +.BI " size_t " ssize ); .fi .SH DESCRIPTION This function appends the input character sequence @@ -23,19 +23,19 @@ into a string at the buffer pointed to by .IR dst . The programmer is responsible for allocating a destination buffer large enough, that is, -.IR "strlen(dst) + strnlen(src, sz) + 1" . +.IR "strlen(dst) + strnlen(src, ssize) + 1" . .P An implementation of this function might be: .P .in +4n .EX char * -strncat(char *restrict dst, const char *restrict src, size_t sz) +strncat(char *restrict dst, const char *restrict src, size_t ssize) { char *p; size_t len; \& - len = strnlen(src, sz); + len = strnlen(src, ssize); p = dst + strlen(dst); p = mempcpy(p, src, len); *p = \[aq]\e0\[aq]; |
