anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
1ff636
From a4409b8ae6b80acffc9a4f89df2d06c498b8c8f9 Mon Sep 17 00:00:00 2001
1ff636
From: Daniel Mack <daniel@zonque.org>
1ff636
Date: Tue, 24 Feb 2015 16:24:14 +0100
1ff636
Subject: [PATCH] test-hashmap: fix gcc5 warning
1ff636
MIME-Version: 1.0
1ff636
Content-Type: text/plain; charset=UTF-8
1ff636
Content-Transfer-Encoding: 8bit
1ff636
1ff636
gcc5 spits out a warning about test-hashmap.c:
1ff636
1ff636
  CC       src/test/test-hashmap.o
1ff636
src/test/test-hashmap.c: In function ‘test_string_compare_func’:
1ff636
src/test/test-hashmap.c:76:79: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
1ff636
1ff636
(cherry picked from commit 4b3eff61640672bf0b19cb8cdd88ce5e84dcda1c)
1ff636
---
1ff636
 src/test/test-hashmap.c | 2 +-
1ff636
 1 file changed, 1 insertion(+), 1 deletion(-)
1ff636
1ff636
diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c
c62b8e
index 6900da9e89..351563b967 100644
1ff636
--- a/src/test/test-hashmap.c
1ff636
+++ b/src/test/test-hashmap.c
1ff636
@@ -75,7 +75,7 @@ static void test_trivial_compare_func(void) {
1ff636
 }
1ff636
 
1ff636
 static void test_string_compare_func(void) {
1ff636
-        assert_se(!string_compare_func("fred", "wilma") == 0);
1ff636
+        assert_se(string_compare_func("fred", "wilma") != 0);
1ff636
         assert_se(string_compare_func("fred", "fred") == 0);
1ff636
 }
1ff636