mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-06 01:21:24 -04:00
[misc] miscellaneous code cleanup and fixes
* Don't use hDrive handle for longer than necessary * Move all the popcount() function calls into missing.h * Ensure that the thread_affinity[] array is properly sized * Improve timeouts for conflicting process search
This commit is contained in:
parent
7df88aa931
commit
b3caf638b6
6 changed files with 25 additions and 33 deletions
10
src/stdfn.c
10
src/stdfn.c
|
@ -37,16 +37,6 @@ int nWindowsVersion = WINDOWS_UNDEFINED;
|
|||
int nWindowsBuildNumber = -1;
|
||||
char WindowsVersionStr[128] = "Windows ";
|
||||
|
||||
// __popcnt16, __popcnt, __popcnt64 are not available for ARM :(
|
||||
uint8_t popcnt8(uint8_t val)
|
||||
{
|
||||
static const uint8_t nibble_lookup[16] = {
|
||||
0, 1, 1, 2, 1, 2, 2, 3,
|
||||
1, 2, 2, 3, 2, 3, 3, 4
|
||||
};
|
||||
return nibble_lookup[val & 0x0F] + nibble_lookup[val >> 4];
|
||||
}
|
||||
|
||||
/*
|
||||
* Hash table functions - modified From glibc 2.3.2:
|
||||
* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue