loplugin:nullptr
Change-Id: I5f0dc970e8522b63570faa0ba05ab19dd0f45d5a
This commit is contained in:
parent
f63858433b
commit
9cbef14160
4 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue