mirror of https://github.com/xzeldon/htop.git
397b5c4bd0
If currently two unsigned values are compared via `a - b`, in the case b is actually bigger than a, the result will not be an negative number (as -1 is expected) but a huge positive number as the subtraction is an unsigned subtraction. Avoid over-/underflow affected operations; use comparisons. Modern compilers will generate sane code, like: xor eax, eax cmp rdi, rsi seta al sbb eax, 0 ret |
||
---|---|---|
.. | ||
Battery.c | ||
Battery.h | ||
IOPriority.h | ||
IOPriorityPanel.c | ||
IOPriorityPanel.h | ||
LinuxProcess.c | ||
LinuxProcess.h | ||
LinuxProcessList.c | ||
LinuxProcessList.h | ||
Platform.c | ||
Platform.h | ||
PressureStallMeter.c | ||
PressureStallMeter.h | ||
SELinuxMeter.c | ||
SELinuxMeter.h | ||
SystemdMeter.c | ||
SystemdMeter.h | ||
ZramMeter.c | ||
ZramMeter.h | ||
ZramStats.h |