aboutsummaryrefslogtreecommitdiff
path: root/src/httprpc.cpp
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2018-06-26 17:19:31 +0200
committerpracticalswift <[email protected]>2018-07-07 10:08:49 +0200
commit6ad0328f1c3e145d3224197eafd0f66b17cc1a1c (patch)
tree882c1e7bb5c90609063a05e642b4efb8cf2c1660 /src/httprpc.cpp
parentMerge #13598: bench: fix incorrect behaviour in prevector.cpp (diff)
downloaddiscoin-6ad0328f1c3e145d3224197eafd0f66b17cc1a1c.tar.xz
discoin-6ad0328f1c3e145d3224197eafd0f66b17cc1a1c.zip
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 de2437943..aec92711c 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;
}