a233116
From c52febcc0314c85d5a0cefc95d7f9ee0d7eb7081 Mon Sep 17 00:00:00 2001
a233116
From: Daniel Mack <daniel@zonque.org>
a233116
Date: Tue, 24 Feb 2015 16:18:43 +0100
a233116
Subject: [PATCH] shared/unit-name: fix gcc5 warning
a233116
a233116
Fix the following gcc5 warning:
a233116
a233116
  CC       src/shared/libsystemd_shared_la-unit-name.lo
a233116
src/shared/unit-name.c: In function 'unit_name_is_valid':
a233116
src/shared/unit-name.c:102:34: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
a233116
                 if (!template_ok == TEMPLATE_VALID && at+1 == e)
a233116
                                  ^
a233116
a233116
(cherry picked from commit f9bf3e260c480f7b660bec3f78a13f52a46ec34d)
a233116
---
a233116
 src/shared/unit-name.c | 2 +-
a233116
 1 file changed, 1 insertion(+), 1 deletion(-)
a233116
a233116
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c
a233116
index 21b66913c9..f728af4a81 100644
a233116
--- a/src/shared/unit-name.c
a233116
+++ b/src/shared/unit-name.c
a233116
@@ -100,7 +100,7 @@ bool unit_name_is_valid(const char *n, enum template_valid template_ok) {
a233116
                 if (at == n)
a233116
                         return false;
a233116
 
a233116
-                if (!template_ok == TEMPLATE_VALID && at+1 == e)
a233116
+                if (template_ok != TEMPLATE_VALID && at+1 == e)
a233116
                         return false;
a233116
         }
a233116