Thread (24 messages) 24 messages, 2 authors, 2021-03-07
STALE1909d

[PATCH 03/22] glob.3: SYNOPSIS: Use 'restrict' in prototypes

From: Alejandro Colomar <hidden>
Date: 2021-03-05 23:52:09
Subsystem: the rest · Maintainer: Linus Torvalds

Both POSIX and glibc use 'restrict' in glob().
Let's use it here too.

.../glibc$ grep_glibc_prototype glob
posix/glob.h:146:
extern int glob (const char *__restrict __pattern, int __flags,
		 int (*__errfunc) (const char *, int),
		 glob_t *__restrict __pglob) __THROW;
.../glibc$

Signed-off-by: Alejandro Colomar <redacted>
---
 man3/glob.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man3/glob.3 b/man3/glob.3
index 94e668e0d..be41fec13 100644
--- a/man3/glob.3
+++ b/man3/glob.3
@@ -38,9 +38,9 @@ glob, globfree \- find pathnames matching a pattern, free memory from glob()
 .nf
 .B #include <glob.h>
 .PP
-.BI "int glob(const char *" pattern ", int " flags ,
+.BI "int glob(const char *restrict " pattern ", int " flags ,
 .BI "         int (*" errfunc ")(const char *" epath ", int " eerrno ),
-.BI "         glob_t *" pglob );
+.BI "         glob_t *restrict " pglob );
 .BI "void globfree(glob_t *" pglob );
 .fi
 .SH DESCRIPTION
-- 
2.30.1.721.g45526154a5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help