summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ad4295b)
raw | patch | inline | side by side (parent: ad4295b)
author | Schmurfy <j.ammous@gmail.com> | |
Wed, 31 Mar 2010 21:41:40 +0000 (23:41 +0200) | ||
committer | Schmurfy <j.ammous@gmail.com> | |
Wed, 31 Mar 2010 21:41:40 +0000 (23:41 +0200) |
src/match_regex.c | patch | blob | history |
diff --git a/src/match_regex.c b/src/match_regex.c
index 3b6db4337cdbd0b982cad7cbaa944fcedce3648d..689ccb7173215050cb964fadc6da5ebb29797e92 100644 (file)
--- a/src/match_regex.c
+++ b/src/match_regex.c
mr_regex_t *plugin_instance;
mr_regex_t *type;
mr_regex_t *type_instance;
- int invert;
+ _Bool invert;
};
/*
return (FC_MATCH_MATCHES);
} /* }}} int mr_match_regexen */
-static int mr_config_add_boolean (int *ret_value, /* {{{ */
- oconfig_item_t *ci)
-{
-
- if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_BOOLEAN))
- {
- ERROR ("`regex' match: `%s' needs exactly one boolean argument.",
- ci->key);
- return (-1);
- }
-
- if (ci->values[0].value.boolean)
- *ret_value = 1;
- else
- *ret_value = 0;
-
- return (0);
-} /* }}} int mv_config_add_boolean */
-
static int mr_config_add_regex (mr_regex_t **re_head, /* {{{ */
oconfig_item_t *ci)
{
else if (strcasecmp ("TypeInstance", child->key) == 0)
status = mr_config_add_regex (&m->type_instance, child);
else if (strcasecmp ("Invert", child->key) == 0)
- status = mr_config_add_boolean(&m->invert, child);
+ status = cf_util_get_boolean(child, &m->invert);
else
{
log_err ("The `%s' configuration option is not understood and "