aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-02-24 15:42:53 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-03-03 23:12:22 +0100
commit23bdd874515b236a32ae2bf4658fd75b148e6efb (patch)
tree44d1008ad365cca5eebf6eeb72faf93d33f2e4d8 /man3
parent62b60779611081c7da90c68fa79ac1ca02794e03 (diff)
downloadman-pages-23bdd874515b236a32ae2bf4658fd75b148e6efb.tar.gz
asprintf.3: SYNOPSIS: Use 'restrict' in prototypes
Glibc uses 'restrict' for [v]asprintf(). Let's use it here too. ...... .../glibc$ grep_glibc_prototype asprintf libio/stdio.h:372: extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; .../glibc$ grep_glibc_prototype vasprintf libio/stdio.h:366: extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))) __wur; .../glibc$ Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
-rw-r--r--man3/asprintf.35
1 files changed, 3 insertions, 2 deletions
diff --git a/man3/asprintf.3 b/man3/asprintf.3
index b682a7793a..d09c2437e3 100644
--- a/man3/asprintf.3
+++ b/man3/asprintf.3
@@ -32,8 +32,9 @@ asprintf, vasprintf \- print to allocated string
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <stdio.h>
.PP
-.BI "int asprintf(char **" strp ", const char *" fmt ", ...);"
-.BI "int vasprintf(char **" strp ", const char *" fmt ", va_list " ap );
+.BI "int asprintf(char **restrict " strp ", const char *restrict " fmt ", ...);"
+.BI "int vasprintf(char **restrict " strp ", const char *restrict " fmt ,
+.BI " va_list " ap );
.fi
.SH DESCRIPTION
The functions