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