summaryrefslogtreecommitdiff
path: root/src/shared/condition-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/condition-util.c')
-rw-r--r--src/shared/condition-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/condition-util.c b/src/shared/condition-util.c
index 7569b40d6d..749b57712a 100644
--- a/src/shared/condition-util.c
+++ b/src/shared/condition-util.c
@@ -45,7 +45,9 @@ Condition* condition_new(ConditionType type, const char *parameter, bool trigger
Condition *c;
int r;
+ assert(type >= 0);
assert(type < _CONDITION_TYPE_MAX);
+ assert(!parameter == (type == CONDITION_NULL));
c = new0(Condition, 1);
if (!c)
@@ -397,7 +399,6 @@ static int condition_test_file_is_executable(Condition *c) {
static int condition_test_null(Condition *c) {
assert(c);
- assert(c->parameter);
assert(c->type == CONDITION_NULL);
/* Note that during parsing we already evaluate the string and