Archived
1
0
Fork 0

compile.c: check filter syntax

This commit is contained in:
Henrik Hautakoski 2011-06-08 18:56:23 +02:00
parent b2df740514
commit 00e149c04c
2 changed files with 3 additions and 2 deletions

View file

@ -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;