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