]> git.tdb.fi Git - ext/subsurface.git/commit
Fix a couple of possible divide-by-zero conditions in statistics
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Jul 2012 03:12:11 +0000 (20:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Jul 2012 03:12:11 +0000 (20:12 -0700)
commit4033625567eafbb2c3c69da9189a0b0c87b74abc
tree6f7c5a4d54d8da9c839dda0dd8a81e11d801669b
parent03174992a8617c9fa3428583713c2e3e12d293a7
Fix a couple of possible divide-by-zero conditions in statistics

Several people reported the average time problem, but there's another
one lurking there too: if the dive duration is zero, you get bogus
average depth information too (but because that one was a floating point
divide, and by default they are unsignalling on x86, it didn't crash, it
just resulted in bogus results).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
statistics.c