summaryrefslogtreecommitdiffstats
path: root/src/bp_sim.cpp
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-06-14 18:12:00 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-06-14 18:12:00 +0300
commitf10425988270f142de60ff02c61cb8d77b9ac03e (patch)
treeb3f526766d9b4470ff0db6f26ad7ac03a7a68d9d /src/bp_sim.cpp
parent14774ed2eabf8a6f218e8674a04ee7d8ce373d64 (diff)
coverity fixes
Diffstat (limited to 'src/bp_sim.cpp')
-rwxr-xr-xsrc/bp_sim.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp
index c9171ae5..78ae09d9 100755
--- a/src/bp_sim.cpp
+++ b/src/bp_sim.cpp
@@ -745,7 +745,7 @@ std::string double_to_human_str(double num,
if (etype ==KBYE_1024){
f=1024.0;
}
- while ((abs_num > f ) && (i< max_cnt)){
+ while ((abs_num > f ) && (i < max_cnt - 1)){
abs_num/=f;
div*=f;
i++;