]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
strftime.3: SYNOPSIS: Use 'restrict' in prototypes
authorAlejandro Colomar <alx.manpages@gmail.com>
Wed, 10 Mar 2021 18:31:40 +0000 (19:31 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 14 Mar 2021 20:40:45 +0000 (21:40 +0100)
Both POSIX and glibc use 'restrict' in strftime().
Let's use it here too.

.../glibc$ grep_glibc_prototype strftime
timezone/private.h:506:
size_t strftime(char *restrict, size_t, char const *restrict,
struct tm const *restrict);
time/time.h:88:
extern size_t strftime (char *__restrict __s, size_t __maxsize,
const char *__restrict __format,
const struct tm *__restrict __tp) __THROW;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/strftime.3

index e49465f29336e938e460782300006a61b9ed15df..6b14b7c5d94bb47f885469f6d8cc0325741ab9dd 100644 (file)
@@ -41,8 +41,9 @@ strftime \- format date and time
 .nf
 .B #include <time.h>
 .PP
-.BI "size_t strftime(char *" s ", size_t " max ", const char *" format ,
-.BI "                const struct tm *" tm );
+.BI "size_t strftime(char *restrict " s ", size_t " max ,
+.BI "                const char *restrict " format ,
+.BI "                const struct tm *restrict " tm );
 .fi
 .SH DESCRIPTION
 The