diff mbox series

[02/22] getsubopt.3: SYNOPSIS: Use 'restrict' in prototypes

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

Commit Message

Alejandro Colomar March 5, 2021, 11:50 p.m. UTC
POSIX does NOT specify getsubopt() to use 'restrict'.
However, glibc uses 'restrict'.
Users might be surprised by this!  Let's use it here too!

.../glibc$ grep_glibc_prototype getsubopt
stdlib/stdlib.h:958:
extern int getsubopt (char **__restrict __optionp,
		      char *const *__restrict __tokens,
		      char **__restrict __valuep)
     __THROW __nonnull ((1, 2, 3)) __wur;
.../glibc$

Cc: glibc <libc-alpha@sourceware.org>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/getsubopt.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/man3/getsubopt.3 b/man3/getsubopt.3
index ed6a24ed6..9bceed075 100644
--- a/man3/getsubopt.3
+++ b/man3/getsubopt.3
@@ -29,8 +29,8 @@  getsubopt \- parse suboption arguments from a string
 .nf
 .B #include <stdlib.h>
 .PP
-.BI "int getsubopt(char **"optionp ", char * const *" tokens \
-", char **" valuep );
+.BI "int getsubopt(char **restrict " optionp ", char *const *restrict " tokens ,
+.BI "              char **restrict " valuep );
 .fi
 .PP
 .RS -4