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