Add an ability to attach comment to check-state rules.

MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2016-08-14 18:34:16 +00:00
parent 58d358e5a1
commit 4a2ea55b11
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=304089

View File

@ -4120,8 +4120,17 @@ compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate)
cmd = next_cmd(cmd, &cblen);
}
if (have_state) /* must be a check-state, we are done */
if (have_state) { /* must be a check-state, we are done */
if (*av != NULL &&
match_token(rule_options, *av) == TOK_COMMENT) {
/* check-state has a comment */
av++;
fill_comment(cmd, av, cblen);
cmd = next_cmd(cmd, &cblen);
av[0] = NULL;
}
goto done;
}
#define OR_START(target) \
if (av[0] && (*av[0] == '(' || *av[0] == '{')) { \