From c31c2eab0ef33df0bf1d46238b7509d1429b110e Mon Sep 17 00:00:00 2001 From: Michele Papalini Date: Fri, 2 Dec 2022 17:04:26 +0100 Subject: fix(libtransport): fix variable type for port number Ref: HICN-820 Signed-off-by: Michele Papalini Change-Id: Ibad1b02abcc40734143ca3dad1d3e37c93ae8eaf --- libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libtransport') diff --git a/libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc b/libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc index 26e7c97e5..0d45ba49d 100644 --- a/libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc +++ b/libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc @@ -42,10 +42,10 @@ void HicnForwarderModule::connect(bool is_consumer) { // Safechecks CHECK(uri.getProtocol() == "hicn") << "The protocol of the forwarder url should be hicn"; - auto port_min = (1 << 10); - auto port_max = (1 << 16); + uint16_t port_min = (1 << 10); + uint16_t port_max = (1 << 16) - 1; - auto port = std::stoul(uri.getPort()); + uint16_t port = std::stoul(uri.getPort()); CHECK(port > port_min && port < port_max) << "The port should be between " << port_min << " and " << port_max; -- cgit 1.2.3-korg