compile.c: check filter syntax
This commit is contained in:
parent
b2df740514
commit
00e149c04c
2 changed files with 3 additions and 2 deletions
2
Makefile
2
Makefile
|
|
@ -11,7 +11,7 @@ install : $(PROGRAMS)
|
|||
cp $^ $(HOME)/bin/
|
||||
|
||||
dlight : dlight.o env.o http.o rss.o filter.o cconf.o dlhist.o
|
||||
dlight-compile : compile.o env.o cconf.o
|
||||
dlight-compile : compile.o env.o filter.o cconf.o
|
||||
dlight-read-config : read-config.o env.o cconf.o
|
||||
|
||||
dlight-% : %.o
|
||||
|
|
|
|||
|
|
@ -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