Thread (16 messages) 16 messages, 2 authors, 2021-03-04
STALE1968d

[PATCH 03/14] getdate.3: SYNOPSIS: Use 'restrict' in prototypes

From: Alejandro Colomar <hidden>
Date: 2021-02-28 00:51:00
Subsystem: the rest · Maintainer: Linus Torvalds

glibc uses 'restrict' in getdate_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getdate_r
time/time.h:297:
extern int getdate_r (const char *__restrict __string,
		      struct tm *__restrict __resbufp);
.../glibc$

Signed-off-by: Alejandro Colomar <redacted>
---
 man3/getdate.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man3/getdate.3 b/man3/getdate.3
index 1f8432303..5334b4bb6 100644
--- a/man3/getdate.3
+++ b/man3/getdate.3
@@ -40,7 +40,7 @@ getdate, getdate_r \- convert a date-plus-time string to broken-down time
 .PP
 .B "#include <time.h>"
 .PP
-.BI "int getdate_r(const char *" string ", struct tm *" res );
+.BI "int getdate_r(const char *restrict " string ", struct tm *restrict " res );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help