From: Alejandro Colomar Date: Wed, 24 Feb 2021 14:42:53 +0000 (+0100) Subject: asprintf.3: SYNOPSIS: Use 'restrict' in prototypes X-Git-Tag: man-pages-5.11~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23bdd874515b236a32ae2bf4658fd75b148e6efb;p=thirdparty%2Fman-pages.git 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 Signed-off-by: Michael Kerrisk --- 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 .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