diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-16 11:38:47 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-16 13:19:16 -0800 |
commit | 8de62c64dc8a9b1e03895714d35e0e781aa0fa1b (patch) | |
tree | 8824f0ba831eb030ef3a010978d4ab1fc3f8bf37 /dive.c | |
parent | 2d0cf4a87a3876678cc93f71c6438106f85898b9 (diff) | |
download | subsurface-8de62c64dc8a9b1e03895714d35e0e781aa0fa1b.tar.gz |
Fix missed "+0.5" rounding - use rint() instead
In commit 23baf20f569f (Use "rint()" instead of rounding manually with
"+ 0.5") I had missed this one remaining place where we rounded things
by adding "+0.5" and then truncated.
Fix that up.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -513,7 +513,7 @@ static void match_standard_cylinder(cylinder_type_t *type) default: return; } - len = snprintf(buffer, sizeof(buffer), fmt, (int) (cuft+0.5)); + len = snprintf(buffer, sizeof(buffer), fmt, rint(cuft)); p = malloc(len+1); if (!p) return; |