os: Round fraction in pnprintf %f format
authorKeith Packard <keithp@keithp.com>
Fri, 8 Feb 2013 16:57:43 +0000 (08:57 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 8 Feb 2013 16:57:43 +0000 (08:57 -0800)
commitb173eb2ae3349c557db1ff9e424fa540b8289bb2
tree5e87b686286364541370f9a95d8f60d1a9926142
parent509b3c3dc82e7abce1900d5e1cddd90f23be5a87
os: Round fraction in pnprintf %f format

Truncating the fraction part leads to a test failure where -1203.30 is
printed as -1203.29. Round this to the nearest value instead by adding
0.5 before converting to an integer

Signed-off-by: Keith Packard <keithp@keithp.com>
os/utils.c