[Pkg-libvirt-commits] [libguestfs] 07/72: tests/charsets: Fix bogus comparison of STRNEQ() == -1.

Hilko Bengen bengen at moszumanska.debian.org
Sun Apr 5 15:19:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository libguestfs.

commit b9db9cc2fd7883df2693d391d5b8ece2fc2a276c
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Feb 11 15:30:55 2015 +0000

    tests/charsets: Fix bogus comparison of STRNEQ() == -1.
    
    gcc 5 rightly flags this code as bogus.
    
    (cherry picked from commit fb24d7405a3b86a21e007c471f1a9abf520265c1)
---
 tests/charsets/test-charset-fidelity.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/charsets/test-charset-fidelity.c b/tests/charsets/test-charset-fidelity.c
index 49e7a61..782b6b3 100644
--- a/tests/charsets/test-charset-fidelity.c
+++ b/tests/charsets/test-charset-fidelity.c
@@ -217,9 +217,9 @@ test_ascii (guestfs_h *g, const struct filesystem *fs)
              "(instead of 3) were returned",
              __func__, fs->fs_name, count);
 
-    if (STRNEQ (files[0], "ABC") == -1 ||
-        STRNEQ (files[1], "abc") == -1 ||
-        STRNEQ (files[2], "def") == -1)
+    if (STRNEQ (files[0], "ABC") ||
+        STRNEQ (files[1], "abc") ||
+        STRNEQ (files[2], "def"))
       error (EXIT_FAILURE, 0,
              "error: %s: %s returned unexpected filenames '%s', '%s', '%s'",
              __func__, fs->fs_name, files[0], files[1], files[2]);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list