diff options
| author | Russell Yanofsky <[email protected]> | 2017-08-14 19:38:18 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2017-08-14 19:38:18 -0400 |
| commit | e666efcdba527a58175f9de3357dd19bb5880178 (patch) | |
| tree | 560a1791dfa656ca7ff73af35b039e5dd9fc50db /src/rpc/misc.cpp | |
| parent | Merge #10607: scripted-diff: stop using the gArgs wrappers (diff) | |
| download | discoin-e666efcdba527a58175f9de3357dd19bb5880178.tar.xz discoin-e666efcdba527a58175f9de3357dd19bb5880178.zip | |
Get rid of redundant RPC params.size() checks
No change in behavior.
Diffstat (limited to 'src/rpc/misc.cpp')
| -rw-r--r-- | src/rpc/misc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index efff4a99a..6917f4b34 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]); } |