Browse Source

* src/filters/pcre.c : add create()

master
Alex 'AdUser' Z 9 years ago
parent
commit
f59a1b6e59
  1. 11
      src/filters/pcre.c

11
src/filters/pcre.c

@ -32,6 +32,17 @@ struct _config {
f2b_regex_t *regexps; f2b_regex_t *regexps;
}; };
cfg_t *
create(const char *id) {
cfg_t *cfg = NULL;
if ((cfg = calloc(1, sizeof(cfg_t))) == NULL)
return NULL;
snprintf(cfg->id, sizeof(cfg->id), "%s", id);
return cfg;
}
bool bool
config(cfg_t *cfg, const char *key, const char *value) { config(cfg_t *cfg, const char *key, const char *value) {
assert(cfg != NULL); assert(cfg != NULL);

Loading…
Cancel
Save