2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

Fix a couple of warnings in the recent trailing slash commit.

This commit is contained in:
Steve Beattie
2007-03-14 22:35:55 +00:00
parent e5cced8ba0
commit 5fe5803aa7

View File

@@ -208,11 +208,12 @@ static pattern_t convert_aaregex_to_pcre(const char *aare, int anchor,
* /*/foo -> should not match //foo
*/
#endif
char *s = sptr;
const char *s = sptr;
while (*s == '*')
s++;
if (*s == '/' || !*s)
if (*s == '/' || !*s) {
STORE("[^/]", dptr, 4);
}
}
if (*(sptr + 1) == '*') {
/* is this the first regex form we