summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-01-08 12:52:09 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2018-01-08 14:31:00 +0100
commit025d1955fba9fbf0fcd9c3d05ad7d020229183e7 (patch)
tree77800ca6b87e27d323350509f17fd60935405377 /searchcore
parenta216aaf3c3d58394a360a1be037f701f8d4e16b7 (diff)
Avoid NULL by using bool operators.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/ddbstate.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp14
2 files changed, 6 insertions, 9 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/ddbstate.h b/searchcore/src/vespa/searchcore/proton/server/ddbstate.h
index 1744d99ed00..30415048b06 100644
--- a/searchcore/src/vespa/searchcore/proton/server/ddbstate.h
+++ b/searchcore/src/vespa/searchcore/proton/server/ddbstate.h
@@ -58,7 +58,6 @@ public:
*/
bool enterLoadState();
bool enterReplayTransactionLogState();
- bool enterReplaySpoolerState();
bool enterRedoReprocessState();
bool enterApplyLiveConfigState();
bool enterReprocessState();
diff --git a/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
index c2e393cd99b..4bece3e6860 100644
--- a/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
@@ -71,7 +71,7 @@ void getStatus(TransLogClient & client,
size_t & count)
{
TransLogClient::Session::UP session = client.open(domainName);
- if (session.get() == NULL) {
+ if ( ! session) {
throw IllegalStateException(
make_string(
"Could not open session with domain '%s' on TLS '%s'",
@@ -123,9 +123,9 @@ TransactionLogManager::startReplay(SerialNum first,
SerialNum syncToken,
TransLogClient::Session::Callback &callback)
{
- assert(_visitor.get() == NULL);
+ assert( !_visitor);
_visitor = createTlcVisitor(callback);
- if (_visitor.get() == NULL) {
+ if (!_visitor) {
throw IllegalStateException(
make_string(
"Could not create visitor for "
@@ -153,12 +153,10 @@ TransactionLogManager::startReplay(SerialNum first,
void
TransactionLogManager::replayDone()
{
- assert(_visitor.get() != NULL);
- LOG(debug,
- "Transaction log replayed for domain '%s'", getDomainName().c_str());
+ assert(_visitor);
+ LOG(debug, "Transaction log replayed for domain '%s'", getDomainName().c_str());
changeReplayDone();
- LOG(debug,
- "Broadcasted replay done for domain '%s'", getDomainName().c_str());
+ LOG(debug, "Broadcasted replay done for domain '%s'", getDomainName().c_str());
if (LOG_WOULD_LOG(event)) {
logReplayComplete();
}