summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/flow_stat.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flow_stat.cpp b/src/flow_stat.cpp
index 7f9df8c7..5c3c7462 100644
--- a/src/flow_stat.cpp
+++ b/src/flow_stat.cpp
@@ -647,7 +647,8 @@ bool CFlowStatRuleMgr::dump_json(std::string & json) {
std::string str_user_id = static_cast<std::ostringstream*>( &(std::ostringstream()
<< user_id) )->str();
for (uint8_t port = 0; port < m_num_ports; port++) {
- std::string str_port = static_cast<std::ostringstream*>( &(std::ostringstream() << port) )->str();
+ std::string str_port = static_cast<std::ostringstream*>( &(std::ostringstream() << int(port) ) )->str();
+
if (user_id_info->get_rx_counter(port) != 0) {
data_section[str_user_id]["rx-pkts"][str_port] = Json::Value::UInt64(user_id_info->get_rx_counter(port));
ret = true;