aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-06-21 21:10:00 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-08-16 10:24:18 +0200
commit36d326e8b0866df4e70f81c2aa0a2e19d544399c (patch)
treebe4837f43af4a7fb2c48753849bb3e7a9b776387 /src/httpserver.cpp
parentd451d0bcf15d8025c3e963df033f918d646aff6a (diff)
downloadbitcoin-36d326e8b0866df4e70f81c2aa0a2e19d544399c.tar.xz
Use nullptr instead of zero (0) as the null pointer constant
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index ba3b0d1a68..815d660288 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -164,13 +164,13 @@ struct HTTPPathHandler
/** HTTP module state */
//! libevent event loop
-static struct event_base* eventBase = 0;
+static struct event_base* eventBase = nullptr;
//! HTTP server
-struct evhttp* eventHTTP = 0;
+struct evhttp* eventHTTP = nullptr;
//! List of subnets to allow RPC connections from
static std::vector<CSubNet> rpc_allow_subnets;
//! Work queue for handling longer requests off the event loop thread
-static WorkQueue<HTTPClosure>* workQueue = 0;
+static WorkQueue<HTTPClosure>* workQueue = nullptr;
//! Handlers for (sub)paths
std::vector<HTTPPathHandler> pathHandlers;
//! Bound listening sockets
@@ -495,11 +495,11 @@ void StopHTTPServer()
}
if (eventHTTP) {
evhttp_free(eventHTTP);
- eventHTTP = 0;
+ eventHTTP = nullptr;
}
if (eventBase) {
event_base_free(eventBase);
- eventBase = 0;
+ eventBase = nullptr;
}
LogPrint(BCLog::HTTP, "Stopped HTTP server\n");
}
@@ -601,9 +601,9 @@ void HTTPRequest::WriteReply(int nStatus, const std::string& strReply)
evbuffer_add(evb, strReply.data(), strReply.size());
HTTPEvent* ev = new HTTPEvent(eventBase, true,
std::bind(evhttp_send_reply, req, nStatus, (const char*)nullptr, (struct evbuffer *)nullptr));
- ev->trigger(0);
+ ev->trigger(nullptr);
replySent = true;
- req = 0; // transferred back to main thread
+ req = nullptr; // transferred back to main thread
}
CService HTTPRequest::GetPeer()