summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2023-03-04 18:10:11 +0000
committerChristos Zoulas <christos@zoulas.com>2023-03-04 18:10:11 +0000
commitc49972ddb4933ee6edc4a2abc7f36f6a42d47300 (patch)
tree250d4e227e6b527e54a15ad6e8f40358f7ff3494
parentf2bc45dd3565d064bd08563f7e22282f0c30a6a0 (diff)
downloadfile-git-c49972ddb4933ee6edc4a2abc7f36f6a42d47300.tar.gz
Don't use C99 (Xi Ruoyao)
-rw-r--r--src/funcs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/funcs.c b/src/funcs.c
index e265de8c..fd1cf15f 100644
--- a/src/funcs.c
+++ b/src/funcs.c
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: funcs.c,v 1.138 2023/02/20 17:09:30 christos Exp $")
+FILE_RCSID("@(#)$File: funcs.c,v 1.139 2023/03/04 18:10:11 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -661,8 +661,9 @@ check_regex(struct magic_set *ms, const char *pat)
{
char sbuf[512];
unsigned char oc = '\0';
+ const char *p;
- for (const char *p = pat; *p; p++) {
+ for (p = pat; *p; p++) {
unsigned char c = *p;
// Avoid repetition
if (c == oc && strchr("?*+{", c) != NULL) {