X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fcondition.c;h=9f2574c2f62d7d06728c2a45e18f72fab48a61a5;hb=30ab6a0fc1bb950c4dcd90dcd3dfe00a810c7fc1;hp=da7560f05fb616f2176f7c2a389bb61b8a2591e1;hpb=63c372cb9df3bee01e3bf8cd7f96f336bddda846;p=elogind.git diff --git a/src/shared/condition.c b/src/shared/condition.c index da7560f05..9f2574c2f 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -23,22 +23,21 @@ #include #include #include -#include #include #include "sd-id128.h" #include "util.h" #include "virt.h" #include "path-util.h" -#include "fileio.h" #include "architecture.h" #include "smack-util.h" #include "apparmor-util.h" #include "ima-util.h" #include "selinux-util.h" #include "audit.h" -#include "condition.h" #include "cap-list.h" +#include "hostname-util.h" +#include "condition.h" Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) { Condition *c; @@ -46,7 +45,7 @@ Condition* condition_new(ConditionType type, const char *parameter, bool trigger assert(type >= 0); assert(type < _CONDITION_TYPE_MAX); - assert(!parameter == (type == CONDITION_NULL)); + assert((!parameter) == (type == CONDITION_NULL)); c = new0(Condition, 1); if (!c) @@ -102,7 +101,7 @@ static int condition_test_kernel_command_line(Condition *c) { _cleanup_free_ char *word = NULL; bool found; - r = unquote_first_word(&p, &word, true); + r = unquote_first_word(&p, &word, UNQUOTE_RELAX); if (r < 0) return r; if (r == 0)