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:
parent
e39b9d64c6
commit
e3bd4545a2
1 changed files with 2 additions and 2 deletions
4
filter.c
4
filter.c
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue