Rémi Bernon (@rbernon) commented about dlls/winegstreamer/main.c:
.err_on = ERR_ON(mfplat) || ERR_ON(quartz) || ERR_ON(wmvcore),
}; HINSTANCE handle;.thread_count = 0,
- DWORD_PTR process_mask;
- int i;
- if (SUCCEEDED(NtQueryInformationProcess( GetCurrentProcess(),
ProcessAffinityMask, &process_mask, sizeof(process_mask), NULL )))
- {
for (i = 0; i < 8 * sizeof(process_mask); i++)
{
if (process_mask & 1 << i)
params.thread_count++;
}
- }
```suggestion:-8+0 if (GetProcessAffinityMask(GetCurrentProcess(), &process_mask, NULL)) { for (i = 0; i < 8 * sizeof(process_mask); i++) { if (process_mask & 1 << i) params.thread_count++; } } ```
As you're doing this on the PE side, you don't have to use Nt APIs.
You could maybe copy `popcount` from `ntdll/rtlbitmap.c`. I think it may be slightly better to make it explicit that it's what is computed, rather than open-coding it.