[PATCH 1/3] interval_set: fix truncation of _size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



_size is type of int64_t. Use int to store the value of _size
will cause value truncation.

Signed-off-by: Henry C Chang <henry.cy.chang@xxxxxxxxx>
---
 src/include/interval_set.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/include/interval_set.h b/src/include/interval_set.h
index ae1c7ff..bfc62a9 100644
--- a/src/include/interval_set.h
+++ b/src/include/interval_set.h
@@ -361,7 +361,7 @@ class interval_set {
 
   void swap(interval_set<T>& other) {
     m.swap(other.m);
-    int t = _size;
+    int64_t t = _size;
     _size = other._size;
     other._size = t;
   }    
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux