Thread (24 messages) 24 messages, 1 author, 2021-03-08
STALE1909d

[PATCH 14/23] puts.3: SYNOPSIS: Use 'restrict' in prototypes

From: Alejandro Colomar <hidden>
Date: 2021-03-08 18:55:15
Subsystem: the rest · Maintainer: Linus Torvalds

Both POSIX and glibc use 'restrict' in fputs().
Let's use it here too.

.../glibc$ grep_glibc_prototype fputs
libio/stdio.h:631:
extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
.../glibc$

Signed-off-by: Alejandro Colomar <redacted>
---
 man3/puts.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man3/puts.3 b/man3/puts.3
index 3b0fb9d2a..e9b0b0c8a 100644
--- a/man3/puts.3
+++ b/man3/puts.3
@@ -34,8 +34,8 @@ fputc, fputs, putc, putchar, puts \- output of characters and strings
 .BI "int putc(int " c ", FILE *" stream );
 .BI "int putchar(int " c );
 .PP
-.BI "int fputs(const char *" "s" ", FILE *" "stream" );
-.BI "int puts(const char *" "s" );
+.BI "int fputs(const char *restrict " s ", FILE *restrict " stream );
+.BI "int puts(const char *" s );
 .fi
 .SH DESCRIPTION
 .BR fputc ()
-- 
2.30.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help