diff mbox series

[20/24] strtoimax.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210310183149.194717-21-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 strtoimax(), strtoumax().
Let's use it here too.

.../glibc$ grep_glibc_prototype strtoimax
stdlib/inttypes.h:297:
extern intmax_t strtoimax (const char *__restrict __nptr,
			   char **__restrict __endptr, int __base) __THROW;
.../glibc$ grep_glibc_prototype strtoumax
stdlib/inttypes.h:301:
extern uintmax_t strtoumax (const char *__restrict __nptr,
			    char ** __restrict __endptr, int __base) __THROW;
.../glibc$

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

Patch

diff --git a/man3/strtoimax.3 b/man3/strtoimax.3
index 9acaa1244..6c14c6ac8 100644
--- a/man3/strtoimax.3
+++ b/man3/strtoimax.3
@@ -28,8 +28,10 @@  strtoimax, strtoumax \- convert string to integer
 .nf
 .B #include <inttypes.h>
 .PP
-.BI "intmax_t strtoimax(const char *" nptr ", char **" endptr ", int " base );
-.BI "uintmax_t strtoumax(const char *" nptr ", char **" endptr ", int " base );
+.BI "intmax_t strtoimax(const char *restrict " nptr ", char **restrict " endptr ,
+.BI "                   int " base );
+.BI "uintmax_t strtoumax(const char *restrict " nptr ", char **restrict " endptr ,
+.BI "                   int " base );
 .fi
 .SH DESCRIPTION
 These functions are just like