diff mbox series

[05/24] setbuf.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210310183149.194717-6-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 setvbuf(), setbuf().
Let's use it here too.

.../glibc$ grep_glibc_prototype setvbuf
libio/stdio.h:308:
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
		    int __modes, size_t __n) __THROW;
.../glibc$ grep_glibc_prototype setbuf
libio/stdio.h:304:
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/setbuf.3 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/man3/setbuf.3 b/man3/setbuf.3
index ac73bb06e..708e5c5aa 100644
--- a/man3/setbuf.3
+++ b/man3/setbuf.3
@@ -52,10 +52,10 @@  setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations
 .nf
 .B #include <stdio.h>
 .PP
-.BI "int setvbuf(FILE *" stream ", char *" buf ", int " mode \
-", size_t " size );
+.BI "int setvbuf(FILE *restrict " stream ", char *restrict " buf ,
+.BI "            int " mode ", size_t " size );
 .PP
-.BI "void setbuf(FILE *" stream ", char *" buf );
+.BI "void setbuf(FILE *restrict " stream ", char *restrict " buf );
 .BI "void setbuffer(FILE *restrict " stream ", char *restrict " buf ,
 .BI "            size_t "  size );
 .BI "void setlinebuf(FILE *" stream );