diff mbox series

[13/22] mbsrtowcs.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210305235105.177359-14-alx.manpages@gmail.com
State Not Applicable
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 3) | expand

Commit Message

Alejandro Colomar March 5, 2021, 11:50 p.m. UTC
Both POSIX and glibc use 'restrict' in mbsrtowcs().
Let's use it here too.

.../glibc$ grep_glibc_prototype mbsrtowcs
wcsmbs/wchar.h:337:
extern size_t mbsrtowcs (wchar_t *__restrict __dst,
			 const char **__restrict __src, size_t __len,
			 mbstate_t *__restrict __ps) __THROW;
.../glibc$

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

Patch

diff --git a/man3/mbsrtowcs.3 b/man3/mbsrtowcs.3
index 429af329e..7b7acaf7c 100644
--- a/man3/mbsrtowcs.3
+++ b/man3/mbsrtowcs.3
@@ -20,8 +20,8 @@  mbsrtowcs \- convert a multibyte string to a wide-character string
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t mbsrtowcs(wchar_t *" dest ", const char **" src ,
-.BI "                  size_t " len ", mbstate_t *" ps );
+.BI "size_t mbsrtowcs(wchar_t *restrict " dest ", const char **restrict " src ,
+.BI "                 size_t " len ", mbstate_t *restrict " ps );
 .fi
 .SH DESCRIPTION
 If