From ea9d80921f04e6f4f2f97f0984f002a98acd92b0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 20 Nov 2013 16:25:50 +0000 Subject: 2013-11-20 Chirayu Desai * libc/include/regex.h, libc/posix/regcomp.c, libc/posix/regerror.c, libc/posix/regex.3 libc/posix/regexec.c: Add restrict keyword. --- newlib/libc/posix/regexec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'newlib/libc/posix/regexec.c') diff --git a/newlib/libc/posix/regexec.c b/newlib/libc/posix/regexec.c index 98f5ef611..6e39e9ead 100644 --- a/newlib/libc/posix/regexec.c +++ b/newlib/libc/posix/regexec.c @@ -140,8 +140,8 @@ static int nope = 0; /* for use in asserts; shuts lint up */ /* - regexec - interface for matching - = extern int regexec(const regex_t *, const char *, size_t, \ - = regmatch_t [], int); + = extern int regexec(const regex_t *__restrict, const char *__restrict, + = size_t, regmatch_t [__restrict], int); = #define REG_NOTBOL 00001 = #define REG_NOTEOL 00002 = #define REG_STARTEND 00004 @@ -155,10 +155,10 @@ static int nope = 0; /* for use in asserts; shuts lint up */ */ int /* 0 success, REG_NOMATCH failure */ regexec(preg, string, nmatch, pmatch, eflags) -const regex_t *preg; -const char *string; +const regex_t *__restrict preg; +const char *__restrict string; size_t nmatch; -regmatch_t pmatch[]; +regmatch_t pmatch[__restrict]; int eflags; { struct re_guts *g = preg->re_g; -- cgit v1.2.3