[Libreoffice-commits] online.git: net/clientnb.cpp net/Ssl.cpp tools/map.cpp wsd/FileServer.cpp

Pranav Kant pranavk at collabora.co.uk
Wed Dec 20 17:09:29 UTC 2017


 net/Ssl.cpp        |    8 ++++----
 net/clientnb.cpp   |    2 +-
 tools/map.cpp      |    2 +-
 wsd/FileServer.cpp |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9cbef1416049ddd0998f0d574e6a53d2af216287
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Wed Dec 20 22:25:04 2017 +0530

    loplugin:nullptr
    
    Change-Id: I5f0dc970e8522b63570faa0ba05ab19dd0f45d5a

diff --git a/net/Ssl.cpp b/net/Ssl.cpp
index 5f6eaa4d..b56b7352 100644
--- a/net/Ssl.cpp
+++ b/net/Ssl.cpp
@@ -80,7 +80,7 @@ SslContext::SslContext(const std::string& certFilePath,
         int errCode = 0;
         if (!caFilePath.empty())
         {
-            errCode = SSL_CTX_load_verify_locations(_ctx, caFilePath.c_str(), 0);
+            errCode = SSL_CTX_load_verify_locations(_ctx, caFilePath.c_str(), nullptr);
             if (errCode != 1)
             {
                 std::string msg = getLastErrorMsg();
@@ -248,9 +248,9 @@ void SslContext::initDH()
     // OpenSSL v1.1.0 has public API changes
     // p, g and length of the Diffie-Hellman param can't be set directly anymore,
     // instead DH_set0_pqg and DH_set_length are used
-    BIGNUM* p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0);
-    BIGNUM* g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0);
-    if ((DH_set0_pqg(dh, p, NULL, g) == 0) || (DH_set_length(dh, 160) == 0))
+    BIGNUM* p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), nullptr);
+    BIGNUM* g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), nullptr);
+    if ((DH_set0_pqg(dh, p, nullptr, g) == 0) || (DH_set_length(dh, 160) == 0))
 #else
     dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0);
     dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0);
diff --git a/net/clientnb.cpp b/net/clientnb.cpp
index ba13d94b..a4581c3d 100644
--- a/net/clientnb.cpp
+++ b/net/clientnb.cpp
@@ -225,7 +225,7 @@ struct Client : public Poco::Util::Application
 
         std::vector<char> res;
 
-        std::srand(std::time(0));
+        std::srand(std::time(nullptr));
 
         std::vector<char> data;
         for (size_t i = 1; i < (1 << 14); ++i)
diff --git a/tools/map.cpp b/tools/map.cpp
index db627daa..b72ab336 100644
--- a/tools/map.cpp
+++ b/tools/map.cpp
@@ -595,7 +595,7 @@ int main(int argc, char **argv)
         else
             appOrPid = arg;
     }
-    if (appOrPid == NULL && forPid == 0)
+    if (appOrPid == nullptr && forPid == 0)
         help = true;
 
     if (help)
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 73308421..9f788818 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -331,7 +331,7 @@ void FileServerRequestHandler::readDirToHash(const std::string &basePath, const
     LOG_TRC("Pre-reading directory: " << basePath << path << "\n");
     workingdir = opendir((basePath + path).c_str());
 
-    while ((currentFile = readdir(workingdir)) != NULL)
+    while ((currentFile = readdir(workingdir)) != nullptr)
     {
         if (currentFile->d_name[0] == '.')
             continue;


More information about the Libreoffice-commits mailing list