]> granicus.if.org Git - procps-ng/commit
top: try avoiding the edge of a 'divide by zero' cliff
authorJim Warner <james.warner@comcast.net>
Sun, 18 Sep 2022 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Tue, 20 Sep 2022 08:50:55 +0000 (18:50 +1000)
commit5f9185e087d0bba3d9ee8c59fbf43b6d658cf70e
tree34a75af4f246f5317e8fcd88a6ae13c5d4cd727d
parent124f26a423854614aae6bb9e4188e39cadb6b77c
top: try avoiding the edge of a 'divide by zero' cliff

Darn, after testing on some older, out of date distros
I was embarrassed to find some awful code I created in
the commit shown below. I was rewarded with some 'nan'
floating point values and 'inf' computational results.

Reference(s);
. a missed opportunity to repent
commit 5c5bff392bfaf78b7bacb9b954c1fd1e9d818544
. true source of my original sin
commit 2d5b51d1a2aa19d077a2f3db5be187f982d70e70

Signed-off-by: Jim Warner <james.warner@comcast.net>
src/top/top.c