summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-12-04 12:58:31 +0100
committerAlejandro Colomar <alx@kernel.org>2023-12-04 12:58:33 +0100
commit9aeebbdeef81301fb9edf665282be3c25484fc3d (patch)
tree93b38266de6995cbfd7128b406f83ba6d6dd9ff5
parentb35221afb54f307d6d14d0cde85c8db39e534880 (diff)
strncat.3: Fix return value of possible implementation
Accidentally, I changed the return while changing something else. Fix it. Fixes: 790795ec4e5e ("strncat.3: Write the null byte with stpcpy(3)") Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man3/strncat.33
1 files changed, 2 insertions, 1 deletions
diff --git a/man3/strncat.3 b/man3/strncat.3
index 6879a0626..a7bf5c41e 100644
--- a/man3/strncat.3
+++ b/man3/strncat.3
@@ -40,7 +40,8 @@ strncat(char *restrict dst, const char *restrict src, size_t ssize)
{
#define strnul(s) (s + strlen(s))
\&
- return stpcpy(mempcpy(strnul(dst), src, strnlen(src, ssize)), "");
+ stpcpy(mempcpy(strnul(dst), src, strnlen(src, ssize)), "");
+ return dst;
}
.EE
.in