summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse.y b/src/parse.y
index 9af8682c1..4355c2222 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3447,8 +3447,9 @@ parse_string(parser_state *p, int term)
if (p->regexp) {
int f = 0;
int c;
- char* s;
- s = strndup(tok(p), toklen(p));
+ char *s = strndup(tok(p), toklen(p));
+ char flag[4] = { '\0' };
+
newtok(p);
while (c = nextc(p), ISALPHA(c)) {
switch (c) {
@@ -3467,7 +3468,6 @@ parse_string(parser_state *p, int term)
toklen(p) > 1 ? "s" : "", tok(p));
yyerror(p, msg);
}
- char flag[4] = {0};
if (f & 1) strcat(flag, "i");
if (f & 2) strcat(flag, "x");
if (f & 4) strcat(flag, "m");