diff mbox series

[17/24] strptime.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210310183149.194717-18-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 strptime().
However, glibc doesn't specify 'restrict' for the last parameter.
Let's use the most restrictive form here
(although I believe both to be equivalent).

.../glibc$ grep_glibc_prototype strptime
time/time.h:95:
extern char *strptime (const char *__restrict __s,
		       const char *__restrict __fmt, struct tm *__tp)
     __THROW;
.../glibc$

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

Patch

diff --git a/man3/strptime.3 b/man3/strptime.3
index c1a66ffc0..30c6f59df 100644
--- a/man3/strptime.3
+++ b/man3/strptime.3
@@ -36,7 +36,8 @@  strptime \- convert a string representation of time to a time tm structure
 .BR "#define _XOPEN_SOURCE" "       /* See feature_test_macros(7) */"
 .B #include <time.h>
 .PP
-.BI "char *strptime(const char *" s ", const char *" format ", struct tm *" tm );
+.BI "char *strptime(const char *restrict " s ", const char *restrict " format ,
+.BI "               struct tm *restrict " tm );
 .fi
 .SH DESCRIPTION
 The