diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-06 02:11:08 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-11-06 14:21:10 +0100 |
commit | b80ba1da1c66f570c10a92a40f54a044fb865739 (patch) | |
tree | 64ca022553e4ba16db87e2c7f569a31394fe1f25 /src/shared | |
parent | 124aff6251c095367ce1323a21fa23235cbb0490 (diff) |
condition: add more test cases
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/condition-util.c | 3 |
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 |