aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Papalini <micpapal@cisco.com>2022-12-02 17:04:26 +0100
committerMichele Papalini <micpapal@cisco.com>2022-12-02 17:04:26 +0100
commitc31c2eab0ef33df0bf1d46238b7509d1429b110e (patch)
tree51410cea4e5cadf54cb051195b68760033b4bfa9
parent4aeff8486824fecd830a1ecf0ef3abc6e58616a7 (diff)
fix(libtransport): fix variable type for port number
Ref: HICN-820 Signed-off-by: Michele Papalini <micpapal@cisco.com> Change-Id: Ibad1b02abcc40734143ca3dad1d3e37c93ae8eaf
-rw-r--r--libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc6
1 files changed, 3 insertions, 3 deletions
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;