aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstate')
-rw-r--r--src/libstate/get_enc.cpp4
-rw-r--r--src/libstate/global_rng.cpp2
-rw-r--r--src/libstate/global_state.cpp4
-rw-r--r--src/libstate/init.cpp2
-rw-r--r--src/libstate/libstate.cpp8
-rw-r--r--src/libstate/lookup.h8
6 files changed, 14 insertions, 14 deletions
diff --git a/src/libstate/get_enc.cpp b/src/libstate/get_enc.cpp
index b7c9a7146..00297464b 100644
--- a/src/libstate/get_enc.cpp
+++ b/src/libstate/get_enc.cpp
@@ -151,7 +151,7 @@ EME* get_eme(const std::string& algo_spec)
Algorithm_Factory& af = global_state().algorithm_factory();
if(request.algo_name() == "Raw")
- return 0; // No padding
+ return nullptr; // No padding
#if defined(BOTAN_HAS_EME_PKCS1v15)
if(request.algo_name() == "PKCS1v15" && request.arg_count() == 0)
@@ -182,7 +182,7 @@ KDF* get_kdf(const std::string& algo_spec)
Algorithm_Factory& af = global_state().algorithm_factory();
if(request.algo_name() == "Raw")
- return 0; // No KDF
+ return nullptr; // No KDF
#if defined(BOTAN_HAS_KDF1)
if(request.algo_name() == "KDF1" && request.arg_count() == 1)
diff --git a/src/libstate/global_rng.cpp b/src/libstate/global_rng.cpp
index f80146596..65da38f5f 100644
--- a/src/libstate/global_rng.cpp
+++ b/src/libstate/global_rng.cpp
@@ -169,7 +169,7 @@ class Serialized_PRNG : public RandomNumberGenerator
RandomNumberGenerator* Library_State::make_global_rng(Algorithm_Factory& af,
std::mutex& mutex)
{
- RandomNumberGenerator* rng = 0;
+ RandomNumberGenerator* rng = nullptr;
#if defined(BOTAN_HAS_HMAC_RNG)
diff --git a/src/libstate/global_state.cpp b/src/libstate/global_state.cpp
index 34bcd03fc..6a846d9b0 100644
--- a/src/libstate/global_state.cpp
+++ b/src/libstate/global_state.cpp
@@ -22,7 +22,7 @@ namespace Global_State_Management {
*/
namespace {
-Library_State* global_lib_state = 0;
+Library_State* global_lib_state = nullptr;
}
@@ -83,7 +83,7 @@ Library_State* swap_global_state(Library_State* new_state)
*/
bool global_state_exists()
{
- return (global_lib_state != 0);
+ return (global_lib_state != nullptr);
}
}
diff --git a/src/libstate/init.cpp b/src/libstate/init.cpp
index 6ab303909..2d724f366 100644
--- a/src/libstate/init.cpp
+++ b/src/libstate/init.cpp
@@ -41,7 +41,7 @@ void LibraryInitializer::initialize(const std::string&)
*/
void LibraryInitializer::deinitialize()
{
- Global_State_Management::set_global_state(0);
+ Global_State_Management::set_global_state(nullptr);
}
}
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp
index eafa6dbb0..7ddfddfca 100644
--- a/src/libstate/libstate.cpp
+++ b/src/libstate/libstate.cpp
@@ -168,9 +168,9 @@ void Library_State::initialize()
*/
Library_State::Library_State()
{
- m_algorithm_factory = 0;
+ m_algorithm_factory = nullptr;
- global_rng_ptr = 0;
+ global_rng_ptr = nullptr;
}
/*
@@ -179,10 +179,10 @@ Library_State::Library_State()
Library_State::~Library_State()
{
delete m_algorithm_factory;
- m_algorithm_factory = 0;
+ m_algorithm_factory = nullptr;
delete global_rng_ptr;
- global_rng_ptr = 0;
+ global_rng_ptr = nullptr;
}
}
diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h
index e10c195b8..96364e1d9 100644
--- a/src/libstate/lookup.h
+++ b/src/libstate/lookup.h
@@ -235,7 +235,7 @@ BOTAN_DLL bool have_algorithm(const std::string& algo_spec);
inline bool have_block_cipher(const std::string& algo_spec)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- return (af.prototype_block_cipher(algo_spec) != 0);
+ return (af.prototype_block_cipher(algo_spec) != nullptr);
}
/**
@@ -248,7 +248,7 @@ inline bool have_block_cipher(const std::string& algo_spec)
inline bool have_stream_cipher(const std::string& algo_spec)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- return (af.prototype_stream_cipher(algo_spec) != 0);
+ return (af.prototype_stream_cipher(algo_spec) != nullptr);
}
/**
@@ -261,7 +261,7 @@ inline bool have_stream_cipher(const std::string& algo_spec)
inline bool have_hash(const std::string& algo_spec)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- return (af.prototype_hash_function(algo_spec) != 0);
+ return (af.prototype_hash_function(algo_spec) != nullptr);
}
/**
@@ -274,7 +274,7 @@ inline bool have_hash(const std::string& algo_spec)
inline bool have_mac(const std::string& algo_spec)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- return (af.prototype_mac(algo_spec) != 0);
+ return (af.prototype_mac(algo_spec) != nullptr);
}
/*