deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [3/3] git commit: CIMI - make sure integer values for memory/storage units
Date Mon, 12 Nov 2012 16:33:26 GMT
CIMI - make sure integer values for memory/storage units


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/1cf35c79
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/1cf35c79
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/1cf35c79

Branch: refs/heads/master
Commit: 1cf35c790881cb2e6f4cab5d54858bc18ade8cbb
Parents: 798dfe9
Author: marios <marios@redhat.com>
Authored: Mon Nov 12 17:30:07 2012 +0200
Committer: marios <marios@redhat.com>
Committed: Mon Nov 12 17:30:07 2012 +0200

----------------------------------------------------------------------
 server/lib/cimi/helpers/cimi_helper.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/1cf35c79/server/lib/cimi/helpers/cimi_helper.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/helpers/cimi_helper.rb b/server/lib/cimi/helpers/cimi_helper.rb
index b61c7d2..f5e2dc3 100644
--- a/server/lib/cimi/helpers/cimi_helper.rb
+++ b/server/lib/cimi/helpers/cimi_helper.rb
@@ -34,9 +34,9 @@ module CIMI
     def to_kibibyte(value, unit)
       case unit
       when "GB"
-        value*1024*1024
+        (value*1024*1024).to_i
       when "MB"
-        value*1024
+        (value*1024).to_i
       else
         nil # should probably be exploding something here...
       end


Mime
View raw message