]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
realpath.3: SYNOPSIS: Use 'restrict' in prototypes
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 8 Mar 2021 18:53:28 +0000 (19:53 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 14 Mar 2021 20:29:13 +0000 (21:29 +0100)
Both POSIX and glibc use 'restrict' in realpath().
Let's use it here too.

.../glibc$ grep_glibc_prototype realpath
stdlib/stdlib.h:800:
extern char *realpath (const char *__restrict __name,
       char *__restrict __resolved) __THROW __wur;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/realpath.3

index 643cdaaec835f6241ec50263517562791fad688b..10056721721a57809508978080d6afc4bbd76c23 100644 (file)
@@ -33,7 +33,8 @@ realpath \- return the canonicalized absolute pathname
 .B #include <limits.h>
 .B #include <stdlib.h>
 .PP
-.BI "char *realpath(const char *" path ", char *" resolved_path );
+.BI "char *realpath(const char *restrict " path ,
+.BI "               char *restrict " resolved_path );
 .fi
 .PP
 .RS -4