[Libreoffice-commits] online.git: test/httpwstest.cpp test/UnitPrefork.cpp

Noel Grandin noel.grandin at collabora.co.uk
Thu Dec 22 14:55:15 UTC 2016


 test/UnitPrefork.cpp |    2 +-
 test/httpwstest.cpp  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 02472514a39bb579eb3db5aa594f232328daee81
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Dec 22 16:38:54 2016 +0200

    loplugin:implicitboolconversion
    
    the change in UnitPrefork.cpp looks like it might fix something
    important
    
    Change-Id: I95741c0256b22ac0bb4caadbd113b96584f784b5
    Reviewed-on: https://gerrit.libreoffice.org/32343
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/test/UnitPrefork.cpp b/test/UnitPrefork.cpp
index 9504c08..bd56337 100644
--- a/test/UnitPrefork.cpp
+++ b/test/UnitPrefork.cpp
@@ -233,7 +233,7 @@ public:
             strncat(name, ent->d_name, 1024);
             size_t len;
             memset(buffer, 0, sizeof(buffer));
-            if ((len = readlink(name, buffer, sizeof(buffer)-1) > 0))
+            if ((len = readlink(name, buffer, sizeof(buffer)-1)) > 0)
             {
                 assert(len<sizeof(buffer));
                 numSockets++;
diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp
index fbf00da..02526d8 100644
--- a/test/httpwstest.cpp
+++ b/test/httpwstest.cpp
@@ -1065,7 +1065,7 @@ void HTTPWSTest::getPartHashCodes(const std::string status,
     {
         CPPUNIT_ASSERT_EQUAL(1, (int)matches.size());
         const auto str = status.substr(matches[0].offset, matches[0].length);
-        if (number.match(str, 0) > 0)
+        if (number.match(str, 0))
         {
             parts.push_back(str);
         }


More information about the Libreoffice-commits mailing list