mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix missed "+0.5" rounding - use rint() instead
In commit 23baf20f56
(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>
This commit is contained in:
parent
2d0cf4a87a
commit
8de62c64dc
1 changed files with 1 additions and 1 deletions
2
dive.c
2
dive.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue