From: Andrei Pavel Date: Tue, 10 Aug 2021 13:56:05 +0000 (+0300) Subject: [#1825] use int in ifindex_'s getters and setters X-Git-Tag: Kea-1.9.11~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efb04ecb94d75d69966cd1bf13b0aedfbd8a218b;p=thirdparty%2Fkea.git [#1825] use int in ifindex_'s getters and setters to match the type of ifindex_ --- diff --git a/src/lib/dhcp/iface_mgr.h b/src/lib/dhcp/iface_mgr.h index f75b8be97d..12420c496a 100644 --- a/src/lib/dhcp/iface_mgr.h +++ b/src/lib/dhcp/iface_mgr.h @@ -213,7 +213,7 @@ public: /// @brief Returns interface index. /// /// @return interface index - int64_t getIndex() const { return ifindex_; } + int getIndex() const { return ifindex_; } /// @brief Returns interface name. /// @@ -400,7 +400,7 @@ protected: std::string name_; /// Interface index (a value that uniquely identifies an interface). - int64_t ifindex_; + int ifindex_; /// List of assigned addresses. AddressCollection addrs_; @@ -487,7 +487,7 @@ public: boost::multi_index::hashed_unique< // Use the interface index as the key. boost::multi_index::const_mem_fun< - Iface, int64_t, &Iface::getIndex + Iface, int, &Iface::getIndex > >, // Start definition of index #2. diff --git a/src/lib/dhcp/pkt.h b/src/lib/dhcp/pkt.h index 84942f5a95..48d03eca13 100644 --- a/src/lib/dhcp/pkt.h +++ b/src/lib/dhcp/pkt.h @@ -480,7 +480,7 @@ public: /// @brief Sets interface index. /// /// @param ifindex specifies interface index. - void setIndex(int64_t ifindex) { + void setIndex(int ifindex) { ifindex_ = ifindex; }; @@ -492,7 +492,7 @@ public: /// @brief Returns interface index. /// /// @return interface index - int64_t getIndex() const { + int getIndex() const { return (ifindex_); };