summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2011-12-20 22:56:13 +0000
committereadler <eadler@FreeBSD.org>2011-12-20 22:56:13 +0000
commit2d67f772cb9e14a0ad6ac92f1eb072705aa1fb38 (patch)
tree776e3a64d9b347bde5def5ac4f12972e220505b0 /lib
parent1d5050a94b01dd5fb04194a79908e299a3becc7d (diff)
downloadFreeBSD-src-2d67f772cb9e14a0ad6ac92f1eb072705aa1fb38.zip
FreeBSD-src-2d67f772cb9e14a0ad6ac92f1eb072705aa1fb38.tar.gz
- Add restrict keyword to glob(3)
PR: kern/161958 Submitted by: Henning Petersen <henning.petersen@t-online.de> Approved by: jilles MFC after: 3 days
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/glob.34
-rw-r--r--lib/libc/gen/glob.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3
index 7d6e43b..468a73b 100644
--- a/lib/libc/gen/glob.3
+++ b/lib/libc/gen/glob.3
@@ -30,7 +30,7 @@
.\" @(#)glob.3 8.3 (Berkeley) 4/16/94
.\" $FreeBSD$
.\"
-.Dd February 15, 2011
+.Dd December 20, 2011
.Dt GLOB 3
.Os
.Sh NAME
@@ -42,7 +42,7 @@
.Sh SYNOPSIS
.In glob.h
.Ft int
-.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob"
+.Fn glob "const char * restrict pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t * restrict pglob"
.Ft void
.Fn globfree "glob_t *pglob"
.Sh DESCRIPTION
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c
index 59663d9..f3ae50f 100644
--- a/lib/libc/gen/glob.c
+++ b/lib/libc/gen/glob.c
@@ -168,7 +168,8 @@ static void qprintf(const char *, Char *);
#endif
int
-glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob)
+glob(const char * __restrict pattern, int flags,
+ int (*errfunc)(const char *, int), glob_t * __restrict pglob)
{
const char *patnext;
size_t limit;
OpenPOWER on IntegriCloud