tree-wide: drop !! casts to booleans
They are not needed, because anything that is non-zero is converted to true. C11: > 6.3.1.2: When any scalar value is converted to _Bool, the result is 0 if the > value compares equal to 0; otherwise, the result is 1. https://stackoverflow.com/questions/31551888/casting-int-to-bool-in-c-c
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ static int detect_vm_cpuid(void) {
|
||||
if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) == 0)
|
||||
return VIRTUALIZATION_NONE;
|
||||
|
||||
hypervisor = !!(ecx & 0x80000000U);
|
||||
hypervisor = ecx & 0x80000000U;
|
||||
|
||||
if (hypervisor) {
|
||||
union {
|
||||
|
||||
Reference in New Issue
Block a user