Fix strmhz(): avoid printing negative fractions
Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
4a7f6b750d
commit
d9d8c7c696
@ -27,7 +27,7 @@ char *strmhz (char *buf, long hz)
|
||||
long l, n;
|
||||
long m;
|
||||
|
||||
n = DIV_ROUND(hz, 1000000L);
|
||||
n = DIV_ROUND(hz, 1000) / 1000L;
|
||||
l = sprintf (buf, "%ld", n);
|
||||
|
||||
hz -= n * 1000000L;
|
||||
|
Loading…
Reference in New Issue
Block a user