[PATCH 16/22] mempcpy.3: SYNOPSIS: Use 'restrict' in prototypes

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

 



glibc uses 'restrict' in mempcpy(), wmempcpy().
Let's use it here too.

.../glibc$ grep_glibc_prototype mempcpy
string/string.h:384:
extern void *mempcpy (void *__restrict __dest,
		      const void *__restrict __src, size_t __n)
     __THROW __nonnull ((1, 2));
.../glibc$ grep_glibc_prototype wmempcpy
wcsmbs/wchar.h:276:
extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
			  const wchar_t *__restrict __s2, size_t __n)
     __THROW;
.../glibc$

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

diff --git a/man3/mempcpy.3 b/man3/mempcpy.3
index 33c032c50..8a810e6a5 100644
--- a/man3/mempcpy.3
+++ b/man3/mempcpy.3
@@ -15,12 +15,15 @@ mempcpy, wmempcpy  \- copy memory area
 .BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
 .B #include <string.h>
 .PP
-.BI "void *mempcpy(void *" dest ", const void *" src ", size_t " n );
+.BI "void *mempcpy(void *restrict " dest ", const void *restrict " src \
+", size_t " n );
 .PP
 .BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wmempcpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
+.BI "wchar_t *wmempcpy(wchar_t *restrict " dest \
+", const wchar_t *restrict " src ,
+.BI "                  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