Don't initialize the first parameter of _BitScanForward* functions

Like the document example, no need to initialize `r` to 0.
https://docs.microsoft.com/en-us/cpp/intrinsics/bitscanforward-bitscanforward64
This commit is contained in:
Ma Lin committed 2021-09-25 16:36:53 +08:00
1 parent 95f492ea17
commit e5ba858270
5 files changed
+10 -12

No files matched your search

+1 -1
View File
@@ -882,7 +882,7 @@ static U32 ZSTD_VecMask_next(ZSTD_VecMask val) {
assert(val != 0);
# if defined(_MSC_VER) && defined(_WIN64)
{
unsigned long r = 0;
unsigned long r;
/* _BitScanForward64 is not defined outside of x64 */
return _BitScanForward64(&r, val) ? (U32)r : 0;
}