summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/unit-name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c
index 0cc06f4f89..86d6ce3df1 100644
--- a/src/shared/unit-name.c
+++ b/src/shared/unit-name.c
@@ -99,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;
}