From 8f2c4f26dc04d9221a773a7983c837f87f022510 Mon Sep 17 00:00:00 2001 From: eadler Date: Sun, 8 Jan 2012 21:01:21 +0000 Subject: [PATCH] MFC r228754: - Add restrict keyword to glob(3) PR: kern/161958 Approved by: jilles git-svn-id: svn://svn.freebsd.org/base/stable/8@229824 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- include/glob.h | 3 ++- lib/libc/gen/glob.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/glob.h b/include/glob.h index 1c0605e55..9c098e1e5 100644 --- a/include/glob.h +++ b/include/glob.h @@ -102,7 +102,8 @@ typedef struct { #endif /* __BSD_VISIBLE */ __BEGIN_DECLS -int glob(const char *, int, int (*)(const char *, int), glob_t *); +int glob(const char * __restrict, int, + int (*)(const char *, int), glob_t * __restrict); void globfree(glob_t *); __END_DECLS diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index c3d9f08dd..9d884894f 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -163,7 +163,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; -- 2.45.0