From e666efcdba527a58175f9de3357dd19bb5880178 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Mon, 14 Aug 2017 19:38:18 -0400 Subject: Get rid of redundant RPC params.size() checks No change in behavior. --- src/rpc/misc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rpc/misc.cpp') diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index efff4a99ae..6917f4b342 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -552,7 +552,7 @@ UniValue getmemoryinfo(const JSONRPCRequest& request) + HelpExampleRpc("getmemoryinfo", "") ); - std::string mode = (request.params.size() < 1 || request.params[0].isNull()) ? "stats" : request.params[0].get_str(); + std::string mode = request.params[0].isNull() ? "stats" : request.params[0].get_str(); if (mode == "stats") { UniValue obj(UniValue::VOBJ); obj.push_back(Pair("locked", RPCLockedMemoryInfo())); @@ -603,11 +603,11 @@ UniValue logging(const JSONRPCRequest& request) } uint32_t originalLogCategories = logCategories; - if (request.params.size() > 0 && request.params[0].isArray()) { + if (request.params[0].isArray()) { logCategories |= getCategoryMask(request.params[0]); } - if (request.params.size() > 1 && request.params[1].isArray()) { + if (request.params[1].isArray()) { logCategories &= ~getCategoryMask(request.params[1]); } -- cgit v1.2.3