diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-02-24 15:42:53 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2021-03-03 23:12:22 +0100 |
| commit | 23bdd874515b236a32ae2bf4658fd75b148e6efb (patch) | |
| tree | 44d1008ad365cca5eebf6eeb72faf93d33f2e4d8 | |
| parent | 62b60779611081c7da90c68fa79ac1ca02794e03 (diff) | |
| download | man-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>
| -rw-r--r-- | man3/asprintf.3 | 5 |
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 |
