Fix strmhz(): avoid printing negative fractions

Signed-off-by: Wolfgang Denk <wd@denx.de>
master
Wolfgang Denk 16 years ago
parent 4a7f6b750d
commit d9d8c7c696
  1. 2
      lib_generic/strmhz.c

@ -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…
Cancel
Save