summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-07-06 20:32:39 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-07-06 20:32:39 -0500
commit46844f1089e3fab4201d09a691dd0d10b797d6cb (patch)
tree054f09dbe98c9f253eb0b4606d16142000b3a55b
parenta7167660f71340182173173fa49b693b1c18ae6b (diff)
downloadvyatta-op-vpn-46844f1089e3fab4201d09a691dd0d10b797d6cb.tar.gz
vyatta-op-vpn-46844f1089e3fab4201d09a691dd0d10b797d6cb.zip
Fix off by one error on byte conversion function
-rw-r--r--lib/OPMode.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/OPMode.pm b/lib/OPMode.pm
index e1af622..c6991b0 100644
--- a/lib/OPMode.pm
+++ b/lib/OPMode.pm
@@ -105,10 +105,10 @@ sub conv_bytes {
if ($bytes > 1024 && $bytes < 1048576){
$bytes = $bytes/1024;
$suffix = "K";
- } elsif ($bytes > 1048576 && $bytes < 1073741824){
+ } elsif ($bytes >= 1048576 && $bytes < 1073741824){
$bytes = $bytes/1048576;
$suffix = "M";
- } elsif ($bytes > 1073741824){
+ } elsif ($bytes >= 1073741824){
$bytes = $bytes/1073741824;
$suffix = "G";
}