summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main_dpdk.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp
index edc3cb67..0d5b2f18 100644
--- a/src/main_dpdk.cpp
+++ b/src/main_dpdk.cpp
@@ -2336,7 +2336,7 @@ private:
std::string CGlobalStats::get_field(std::string name,float &f){
char buff[200];
- if(f >= -10.0 or f <= 10.0)
+ if(f <= -10.0 or f >= 10.0)
snprintf(buff, sizeof(buff), "\"%s\":%.1f,",name.c_str(),f);
else
snprintf(buff, sizeof(buff), "\"%s\":%.3e,",name.c_str(),f);
@@ -2351,7 +2351,7 @@ std::string CGlobalStats::get_field(std::string name,uint64_t &f){
std::string CGlobalStats::get_field_port(int port,std::string name,float &f){
char buff[200];
- if(f >= -10.0 or f <= 10.0)
+ if(f <= -10.0 or f >= 10.0)
snprintf(buff, sizeof(buff), "\"%s-%d\":%.1f,",name.c_str(),port,f);
else
snprintf(buff, sizeof(buff), "\"%s-%d\":%.3e,",name.c_str(),port,f);