Archived
1
0
Fork 0

filter.c: compile: Oops, assigning function to char pointer

info->msg is being assigned to 'error'. but there is no such variable.
altho there is such a function in error.h

fix this by assigning info->msg to 'err' instead, that is the variable
passed to pcre_compile().
This commit is contained in:
Henrik Hautakoski 2011-10-12 14:53:48 +02:00
parent e39b9d64c6
commit e3bd4545a2

View file

@ -38,7 +38,7 @@ static inline pcre* compile(const char *pattern, struct __error_info *info) {
regex = pcre_compile(pattern, 0, &err, &eoffset, NULL);
if (!regex) {
if (info) {
info->msg = error;
info->msg = err;
info->offset = eoffset;
}
return NULL;
@ -97,4 +97,4 @@ int filter_match_list(char **patterns, unsigned n, const char *subject) {
return 1;
}
return 0;
}
}