aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/misc.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-08-14 19:38:18 -0400
committerRussell Yanofsky <russ@yanofsky.org>2017-08-14 19:38:18 -0400
commite666efcdba527a58175f9de3357dd19bb5880178 (patch)
tree560a1791dfa656ca7ff73af35b039e5dd9fc50db /src/rpc/misc.cpp
parentc2704ec98a1b7b35b6a7c1b6b26a3f16d44e8880 (diff)
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.cpp6
1 files changed, 3 insertions, 3 deletions
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]);
}