From ed2a08bf25e3b4e6a88c55402ab5dc11061ad68e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 7 May 2015 11:17:36 +0200 Subject: [PATCH] cleanup: use 64bit ulongs Use 64bit arithmetics for all numbers (Coverity). --- lib/metadata/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index 028de84c2..a0418ce90 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -164,7 +164,7 @@ uint32_t adjusted_mirror_region_size(uint32_t extent_size, uint32_t extents, uint64_t region_max; uint64_t region_min, region_min_pow2; - region_max = (1 << (ffs((int)extents) - 1)) * (uint64_t) (1 << (ffs((int)extent_size) - 1)); + region_max = (1UL << (ffs((int)extents) - 1)) * (1UL << (ffs((int)extent_size) - 1)); if (region_max < UINT32_MAX && region_size > region_max) { region_size = (uint32_t) region_max;