diff mbox series

[10/24] stpncpy.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210310183149.194717-11-alx.manpages@gmail.com
State New
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 5) | expand

Commit Message

Alejandro Colomar March 10, 2021, 6:31 p.m. UTC
Both POSIX and glibc use 'restrict' in stpncpy().
Let's use it here too.

.../glibc$ grep_glibc_prototype stpncpy
string/string.h:483:
extern char *stpncpy (char *__restrict __dest,
		      const char *__restrict __src, size_t __n)
     __THROW __nonnull ((1, 2));
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/stpncpy.3 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/man3/stpncpy.3 b/man3/stpncpy.3
index 3adc5f426..493d42378 100644
--- a/man3/stpncpy.3
+++ b/man3/stpncpy.3
@@ -18,7 +18,8 @@  stpncpy \- copy a fixed-size string, returning a pointer to its end
 .nf
 .B #include <string.h>
 .PP
-.BI "char *stpncpy(char *" dest ", const char *" src ", size_t " n );
+.BI "char *stpncpy(char *restrict " dest ", const char *restrict " src \
+", size_t " n );
 .fi
 .PP
 .RS -4