projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a7f6b7
)
Fix strmhz(): avoid printing negative fractions
author
Wolfgang Denk
<wd@denx.de>
Tue, 21 Oct 2008 13:53:51 +0000
(15:53 +0200)
committer
Wolfgang Denk
<wd@denx.de>
Wed, 22 Oct 2008 06:52:19 +0000
(08:52 +0200)
Signed-off-by: Wolfgang Denk <wd@denx.de>
lib_generic/strmhz.c
patch
|
blob
|
history
diff --git
a/lib_generic/strmhz.c
b/lib_generic/strmhz.c
index 342cf2b21269bf3b3b0cde9cfc0795b7d5440136..d6da1d136eef49c4207127672e0c577f74ae8f47 100644
(file)
--- 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, 1000
000L)
;
+ n = DIV_ROUND(hz, 1000
) / 1000L
;
l = sprintf (buf, "%ld", n);
hz -= n * 1000000L;