summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-10-21 15:53:51 +0200
committerWolfgang Denk <wd@denx.de>2008-10-22 08:52:19 +0200
commitd9d8c7c696dec370ca714c03beb6e79d4c90bd5e (patch)
tree66a8b86a6f9f7b13a664d7c59a3944bd7fc9d504
parent4a7f6b750d8de543fdf8e58acd86745010054571 (diff)
downloadu-boot-imx-d9d8c7c696dec370ca714c03beb6e79d4c90bd5e.zip
u-boot-imx-d9d8c7c696dec370ca714c03beb6e79d4c90bd5e.tar.gz
u-boot-imx-d9d8c7c696dec370ca714c03beb6e79d4c90bd5e.tar.bz2
Fix strmhz(): avoid printing negative fractions
Signed-off-by: Wolfgang Denk <wd@denx.de>
-rw-r--r--lib_generic/strmhz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib_generic/strmhz.c b/lib_generic/strmhz.c
index 342cf2b..d6da1d1 100644
--- a/lib_generic/strmhz.c
+++ b/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;