X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fcondition.c;h=db12df952b143aa8bf4e36528fd9763e5e1c7c8d;hb=17384d7f95169dad5f769431374fc2c08101206d;hp=4faca2b8dceb232b4098492345a541fcb6d86f37;hpb=080bfdbb8e9f3d23594b101d7f50e7e2f9e4699b;p=elogind.git diff --git a/src/shared/condition.c b/src/shared/condition.c index 4faca2b8d..db12df952 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -23,14 +23,12 @@ #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" @@ -46,7 +44,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 +100,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) @@ -288,7 +286,7 @@ static int condition_test_needs_update(Condition *c) { if (!path_is_absolute(c->parameter)) return true; - p = strappenda(c->parameter, "/.updated"); + p = strjoina(c->parameter, "/.updated"); if (lstat(p, &other) < 0) return true;