]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
strncat.3: Fix return value of possible implementation
authorAlejandro Colomar <alx@kernel.org>
Mon, 4 Dec 2023 11:58:31 +0000 (12:58 +0100)
committerAlejandro Colomar <alx@kernel.org>
Mon, 4 Dec 2023 11:58:33 +0000 (12:58 +0100)
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>
man3/strncat.3

index 6879a0626bb88764a7607c4078c35ee484be6823..a7bf5c41eafeb7bf9f99ac6359cee1283674d8cc 100644 (file)
@@ -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