interval_set: fix truncation of _size
PATCH 1/3 interval_set: fix truncation of _size
_size is type of int64_t. Use int to store the value of _size will cause value truncation.
Signed-off-by Henry C Chang <[email protected]>
--- src/include/interval_set.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
src/include/interval_set.h +1 -1
@@ -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; }
Signature · 1 line
1.7.4.1
Sage Weil
AppliedApplied all three of these. Thanks!
sage
Quoted 30 lines · Henry C Chang
_sizeis type ofint64_t. Use int to store the value of_sizewill cause value truncation.Signed-off-by Henry C Chang <[email protected]>--- src/include/interval_set.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)src/include/interval_set.h +1
-1@@ -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; }Signature · 6 lines
1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html