]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix minor potential narrowing bug 349/head
authorNick Terrell <terrelln@fb.com>
Wed, 7 Sep 2016 03:27:11 +0000 (20:27 -0700)
committerNick Terrell <terrelln@fb.com>
Wed, 7 Sep 2016 03:27:11 +0000 (20:27 -0700)
contrib/pzstd/Pzstd.cpp

index 0caf0f933ab530994c5a6768091182546b207b2f..87c4c202f15d31253b59672e5e9f1a35f25318b8 100644 (file)
@@ -221,7 +221,7 @@ static size_t calculateStep(
     std::uintmax_t size,
     size_t numThreads,
     const ZSTD_parameters &params) {
-  size_t step = 1ul << (params.cParams.windowLog + 2);
+  size_t step = size_t{1} << (params.cParams.windowLog + 2);
   // If file size is known, see if a smaller step will spread work more evenly
   if (size != 0) {
     const std::uintmax_t newStep = size / std::uintmax_t{numThreads};