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

Alejandro Colomar
2021-03-10T18:33:10Z

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 --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
--
2.30.1.721.g45526154a5