X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Funit-name.c;h=86d6ce3df1583bb3fd67de6a6ccb3d9f0d4e73b3;hb=2b8a4d0a532c3bd4039f1a3ee6943ec0ef855f0d;hp=21b66913c9d1dae539f17db31dc2a8bd3f83a99e;hpb=5e03c6e3b517286bbd65b48d88f60e5b83721894;p=elogind.git diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 21b66913c..86d6ce3df 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -21,7 +21,6 @@ #include #include -#include #include "path-util.h" #include "bus-label.h" @@ -100,7 +99,7 @@ bool unit_name_is_valid(const char *n, enum template_valid template_ok) { if (at == n) return false; - if (!template_ok == TEMPLATE_VALID && at+1 == e) + if (template_ok != TEMPLATE_VALID && at+1 == e) return false; }