Skip to content

Commit b50b84c

Browse files
authored
Merge pull request #142 from polycube-network/fix/compilation_warnings
fix two small compilation warnings
2 parents 4cde2de + d509182 commit b50b84c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/services/pcn-k8switch/src/Service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ void Service::updateKernelServiceMap() {
325325
// In doesn't indicate a real backend
326326
backend value{
327327
.ip = utils::ip_string_to_be_uint(getVip()),
328-
.port = consistent_array.size(),
328+
.port = uint8_t(consistent_array.size()),
329329
.proto = 0,
330330
};
331331
// logger()->trace("Setting Service map with key: {0} and value: {1}",

src/services/pcn-nat/src/Nat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ std::shared_ptr<NattingTable> Nat::getNattingTable(
163163
.dst_ip = utils::ip_string_to_be_uint(internalDst),
164164
.src_port = htons(internalSport),
165165
.dst_port = htons(internalDport),
166-
.proto = std::stol(proto),
166+
.proto = uint8_t(std::stol(proto)),
167167
};
168168

169169
st_v value = table.get(map_key);

0 commit comments

Comments
 (0)