From 6423c8175fad3163c10ffdb49e0df48e4e4931f1 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Mon, 1 Mar 2021 21:35:28 +0100 Subject: p2p, refactor: pass and use uint16_t CService::port as uint16_t --- src/httpserver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/httpserver.cpp') diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 0a8e58ab67..e1c8ec4ab9 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -290,8 +290,8 @@ static bool ThreadHTTP(struct event_base* base) /** Bind HTTP server to specified addresses */ static bool HTTPBindAddresses(struct evhttp* http) { - int http_port = gArgs.GetArg("-rpcport", BaseParams().RPCPort()); - std::vector > endpoints; + uint16_t http_port{static_cast(gArgs.GetArg("-rpcport", BaseParams().RPCPort()))}; + std::vector> endpoints; // Determine what addresses to bind to if (!(gArgs.IsArgSet("-rpcallowip") && gArgs.IsArgSet("-rpcbind"))) { // Default to loopback if not allowing external IPs @@ -305,7 +305,7 @@ static bool HTTPBindAddresses(struct evhttp* http) } } else if (gArgs.IsArgSet("-rpcbind")) { // Specific bind address for (const std::string& strRPCBind : gArgs.GetArgs("-rpcbind")) { - int port = http_port; + uint16_t port{http_port}; std::string host; SplitHostPort(strRPCBind, port, host); endpoints.push_back(std::make_pair(host, port)); -- cgit v1.2.3