diff options
Diffstat (limited to 'src/regex')
-rw-r--r-- | src/regex/glob.c | 2 | ||||
-rw-r--r-- | src/regex/regcomp.c | 2 | ||||
-rw-r--r-- | src/regex/regerror.c | 2 | ||||
-rw-r--r-- | src/regex/regexec.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/regex/glob.c b/src/regex/glob.c index 3476e010..6c07e6b3 100644 --- a/src/regex/glob.c +++ b/src/regex/glob.c @@ -156,7 +156,7 @@ static int sort(const void *a, const void *b) return strcmp(*(const char **)a, *(const char **)b); } -int glob(const char *pat, int flags, int (*errfunc)(const char *path, int err), glob_t *g) +int glob(const char *restrict pat, int flags, int (*errfunc)(const char *path, int err), glob_t *restrict g) { const char *p=pat, *d; struct match head = { .next = NULL }, *tail = &head; diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c index 322a5e67..399989e7 100644 --- a/src/regex/regcomp.c +++ b/src/regex/regcomp.c @@ -3091,7 +3091,7 @@ tre_ast_to_tnfa(tre_ast_node_t *node, tre_tnfa_transition_t *transitions, int -regcomp(regex_t *preg, const char *regex, int cflags) +regcomp(regex_t *restrict preg, const char *restrict regex, int cflags) { tre_stack_t *stack; tre_ast_node_t *tree, *tmp_ast_l, *tmp_ast_r; diff --git a/src/regex/regerror.c b/src/regex/regerror.c index 0645b8e7..df4afa4f 100644 --- a/src/regex/regerror.c +++ b/src/regex/regerror.c @@ -26,7 +26,7 @@ static const char messages[] = { "\0Unknown error" }; -size_t regerror(int e, const regex_t *preg, char *buf, size_t size) +size_t regerror(int e, const regex_t *restrict preg, char *restrict buf, size_t size) { const char *s; for (s=messages; e && *s; e--, s+=strlen(s)+1); diff --git a/src/regex/regexec.c b/src/regex/regexec.c index 8107aae7..855cef57 100644 --- a/src/regex/regexec.c +++ b/src/regex/regexec.c @@ -977,8 +977,8 @@ tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags, */ int -regexec(const regex_t *preg, const char *string, - size_t nmatch, regmatch_t pmatch[], int eflags) +regexec(const regex_t *restrict preg, const char *restrict string, + size_t nmatch, regmatch_t pmatch[restrict], int eflags) { tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD; reg_errcode_t status; |