[PATCH 12/24] strcpy.3: SYNOPSIS: Use 'restrict' in prototypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both POSIX and glibc use 'restrict' in strcpy(), strncpy().
Let's use it here too.

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

Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
 man3/strcpy.3 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/man3/strcpy.3 b/man3/strcpy.3
index 46993cdb3..ade8b9412 100644
--- a/man3/strcpy.3
+++ b/man3/strcpy.3
@@ -39,8 +39,9 @@ strcpy, strncpy \- copy a string
 .nf
 .B #include <string.h>
 .PP
-.BI "char *strcpy(char *" dest ", const char *" src );
-.BI "char *strncpy(char *" dest ", const char *" src ", size_t " n );
+.BI "char *strcpy(char *restrict " dest ", const char *" src );
+.BI "char *strncpy(char *restrict " dest ", const char *restrict " src \
+", size_t " n );
 .fi
 .SH DESCRIPTION
 The
-- 
2.30.1.721.g45526154a5




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux