mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 21:22:47 +01:00
Use nullptr instead of zero (0) as the null pointer constant
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user