compile.c: check filter syntax
This commit is contained in:
parent
b2df740514
commit
00e149c04c
2 changed files with 3 additions and 2 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include <ctype.h>
|
||||
#include "env.h"
|
||||
#include "cconf.h"
|
||||
#include "filter.h"
|
||||
|
||||
#define error(...) fprintf(stderr, "error: " __VA_ARGS__)
|
||||
|
||||
|
|
@ -141,7 +142,7 @@ static int parse_alias() {
|
|||
static int parse_filter(struct target *target) {
|
||||
|
||||
char *value = parse_value();
|
||||
if (!value)
|
||||
if (!value || !filter_check_syntax(value))
|
||||
return -1;
|
||||
cconf_add_filter(target, strdup(value));
|
||||
return 0;
|
||||
|
|
|
|||
Reference in a new issue