mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge branch 'maint-0.3.0' into maint-0.3.1
This commit is contained in:
@@ -40,7 +40,7 @@ static __inline int clz32(unsigned long val)
|
||||
{
|
||||
DWORD zeros = 0;
|
||||
_BitScanReverse(&zeros, val);
|
||||
return zeros;
|
||||
return 31 - zeros;
|
||||
}
|
||||
#ifdef _WIN64
|
||||
/* According to the documentation, these only exist on Win64. */
|
||||
@@ -54,7 +54,7 @@ static __inline int clz64(uint64_t val)
|
||||
{
|
||||
DWORD zeros = 0;
|
||||
_BitScanReverse64(&zeros, val);
|
||||
return zeros;
|
||||
return 63 - zeros;
|
||||
}
|
||||
#else
|
||||
static __inline int ctz64(uint64_t val)
|
||||
|
||||
Reference in New Issue
Block a user