aboutsummaryrefslogtreecommitdiff
path: root/src/httprpc.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-06-26 17:19:31 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-07-07 10:08:49 +0200
commit6ad0328f1c3e145d3224197eafd0f66b17cc1a1c (patch)
tree882c1e7bb5c90609063a05e642b4efb8cf2c1660 /src/httprpc.cpp
parent0212187fc624ea4a02fc99bc57ebd413499a9ee1 (diff)
downloadbitcoin-6ad0328f1c3e145d3224197eafd0f66b17cc1a1c.tar.xz
Don't assert(foo()) where foo has side effects
Diffstat (limited to 'src/httprpc.cpp')
-rw-r--r--src/httprpc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index de2437943e..aec92711c9 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -240,8 +240,9 @@ bool StartHTTPRPC()
// ifdef can be removed once we switch to better endpoint support and API versioning
RegisterHTTPHandler("/wallet/", false, HTTPReq_JSONRPC);
#endif
- assert(EventBase());
- httpRPCTimerInterface = MakeUnique<HTTPRPCTimerInterface>(EventBase());
+ struct event_base* eventBase = EventBase();
+ assert(eventBase);
+ httpRPCTimerInterface = MakeUnique<HTTPRPCTimerInterface>(eventBase);
RPCSetTimerInterface(httpRPCTimerInterface.get());
return true;
}