From 6ad0328f1c3e145d3224197eafd0f66b17cc1a1c Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 26 Jun 2018 17:19:31 +0200 Subject: Don't assert(foo()) where foo has side effects --- src/httprpc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/httprpc.cpp') 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(EventBase()); + struct event_base* eventBase = EventBase(); + assert(eventBase); + httpRPCTimerInterface = MakeUnique(eventBase); RPCSetTimerInterface(httpRPCTimerInterface.get()); return true; } -- cgit v1.2.3