diff options
author | Craig Small <csmall@dropbear.xyz> | 2023-03-01 17:20:42 +1100 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2023-03-01 17:20:42 +1100 |
commit | 9b2f49166b73cef360cff0682459a0aa3e6ec8d8 (patch) | |
tree | 7fb621d11a9df6679b2406be314f26cafc6e8fe9 /src/kill.c | |
parent | 806eb270f217ff7e1e745c7bda2b002b5be74be4 (diff) | |
download | procps-ng-9b2f49166b73cef360cff0682459a0aa3e6ec8d8.tar.gz |
tests: Dont compare floats with ==
Comparing floats with == is bad and I should feel bad I did this.
The problem is if something is close to, but not quite the exact
same fails tests.
I have used an epsilon of 1 because we don't care about accuracy,
just that the function works well enough.
References:
issue procps-ng/procps#271
https://how-to.fandom.com/wiki/Howto_compare_floating_point_numbers_in_the_C_programming_language
Signed-off-by: Craig Small <csmall@dropbear.xyz>
Diffstat (limited to 'src/kill.c')
0 files changed, 0 insertions, 0 deletions