diff options
| author | Alejandro Colomar <alx@kernel.org> | 2023-12-03 23:52:17 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-12-04 00:37:01 +0100 |
| commit | 790795ec4e5eb5f841dfb946b30c43b7cde44086 (patch) | |
| tree | ddbc31449a6616fcfa4bfe51b816fb856274f6d1 | |
| parent | 1f597745b7c76f7cf13e33e8fc1fe23c70eb3c37 (diff) | |
| download | man-pages-790795ec4e5eb5f841dfb946b30c43b7cde44086.tar.gz | |
strncat.3: Write the null byte with stpcpy(3)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man3/strncat.3 | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/man3/strncat.3 b/man3/strncat.3 index a31b979ae6..6879a0626b 100644 --- a/man3/strncat.3 +++ b/man3/strncat.3 @@ -39,12 +39,8 @@ char * strncat(char *restrict dst, const char *restrict src, size_t ssize) { #define strnul(s) (s + strlen(s)) - char *p; \& - p = mempcpy(strnul(dst), src, strnlen(src, ssize)); - *p = \[aq]\e0\[aq]; -\& - return dst; + return stpcpy(mempcpy(strnul(dst), src, strnlen(src, ssize)), ""); } .EE .in |
