未验证 提交 b84120d0 编写于 作者: wafwerar's avatar wafwerar 提交者: GitHub

Merge pull request #13806 from taosdata/fix/ZhiqiangWang/TD-16357-fix-lz4-error

os: fix lz4 error
......@@ -45,13 +45,13 @@ int32_t BUILDIN_CLZL(uint64_t val) {
#else
_MyBitScanReverse64(&r, val);
#endif
return (int)(r >> 3);
return (int)(63 - r);
}
int32_t BUILDIN_CLZ(uint32_t val) {
unsigned long r = 0;
_BitScanReverse(&r, val);
return (int)(r >> 3);
return (int)(31 - r);
}
int32_t BUILDIN_CTZL(uint64_t val) {
......@@ -61,13 +61,13 @@ int32_t BUILDIN_CTZL(uint64_t val) {
#else
_MyBitScanForward64(&r, val);
#endif
return (int)(r >> 3);
return (int)(r);
}
int32_t BUILDIN_CTZ(uint32_t val) {
unsigned long r = 0;
_BitScanForward(&r, val);
return (int)(r >> 3);
return (int)(r);
}
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册