POSIX specifies that the parameters of stat(), lstat(), and fstatat() shall be 'restrict'. Glibc uses 'restrict' too. Let's use it here too. ...... .../glibc$ grep_glibc_prototype stat io/sys/stat.h:205: extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype lstat io/sys/stat.h:259: extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype fstatat io/sys/stat.h:234: extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); .../glibc$ Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx> --- man2/stat.2 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/man2/stat.2 b/man2/stat.2 index fed926715..00c023d7c 100644 --- a/man2/stat.2 +++ b/man2/stat.2 @@ -44,16 +44,17 @@ stat, fstat, lstat, fstatat \- get file status .B #include <sys/types.h> .B #include <sys/stat.h> .PP -.BI "int stat(const char *" pathname ", struct stat *" statbuf ); +.BI "int stat(const char *restrict " pathname , +.BI " struct stat *restrict " statbuf ); .BI "int fstat(int " fd ", struct stat *" statbuf ); -.BI "int lstat(const char *" pathname ", struct stat *" statbuf ); +.BI "int lstat(const char *restrict " pathname , +.BI " struct stat *restrict " statbuf ); .PP .BR "#include <fcntl.h> " "/* Definition of AT_* constants */" .B #include <sys/stat.h> .PP -.BI "int fstatat(int " dirfd ", const char *" pathname ", struct stat *" \ -statbuf , -.BI " int " flags ); +.BI "int fstatat(int " dirfd ", const char *restrict " pathname , +.BI " struct stat *restrict " statbuf ", int " flags ); .fi .PP .RS -4 -- 2.30.0