aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2017-03-29 17:51:41 +0200
committerJorge Timón <jtimon@jtimon.cc>2017-06-27 02:54:19 +0200
commit506b700dcb5dd5a7c1d8ffa7c77043a93e4e10de (patch)
tree7f46aa37dccf2c77cb897c00afbede86e40a7f42 /src/httpserver.cpp
parent234ffc677ee58591b139695bf92bbd6f504ee91a (diff)
downloadbitcoin-506b700dcb5dd5a7c1d8ffa7c77043a93e4e10de.tar.xz
Util: Remove redundant calls to gArgs.IsArgSet()
Return empty std::vector<std::string> with ArgsManager::GetArgs if nothing is set for that string
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 1557cf98f8..e7ece42b0d 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -196,8 +196,7 @@ static bool InitHTTPAllowList()
LookupHost("::1", localv6, false);
rpc_allow_subnets.push_back(CSubNet(localv4, 8)); // always allow IPv4 local subnet
rpc_allow_subnets.push_back(CSubNet(localv6)); // always allow IPv6 localhost
- if (gArgs.IsArgSet("-rpcallowip")) {
- for (const std::string& strAllow : gArgs.GetArgs("-rpcallowip")) {
+ for (const std::string& strAllow : gArgs.GetArgs("-rpcallowip")) {
CSubNet subnet;
LookupSubNet(strAllow.c_str(), subnet);
if (!subnet.IsValid()) {
@@ -207,7 +206,6 @@ static bool InitHTTPAllowList()
return false;
}
rpc_allow_subnets.push_back(subnet);
- }
}
std::string strAllowed;
for (const CSubNet& subnet : rpc_allow_subnets)