Browse Source

* src/filters/pcre.c : misc errors

master
Alex 'AdUser' Z 9 years ago
parent
commit
82513f0b7f
  1. 6
      src/filters/pcre.c

6
src/filters/pcre.c

@ -14,7 +14,7 @@
#include <pcre.h> #include <pcre.h>
#define HOST_REGEX "([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})" #define HOST_REGEX "(?<host>[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"
typedef struct f2b_regex_t { typedef struct f2b_regex_t {
struct f2b_regex_t *next; struct f2b_regex_t *next;
@ -102,7 +102,7 @@ append(cfg_t *cfg, const char *pattern) {
} }
if (cfg->study) { if (cfg->study) {
flags = PCRE_STUDY_EXTRA_NEEDED; flags = 0;
if (cfg->usejit) if (cfg->usejit)
flags |= PCRE_STUDY_JIT_COMPILE; flags |= PCRE_STUDY_JIT_COMPILE;
if ((regex->data = pcre_study(regex->regex, 0, &errptr)) == NULL) { if ((regex->data = pcre_study(regex->regex, 0, &errptr)) == NULL) {
@ -115,7 +115,7 @@ append(cfg_t *cfg, const char *pattern) {
regex->next = cfg->regexps; regex->next = cfg->regexps;
cfg->regexps = regex; cfg->regexps = regex;
return false; return true;
} }
bool bool

Loading…
Cancel
Save