Skip to content
Snippets Groups Projects
Commit d9d8c7c6 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

Fix strmhz(): avoid printing negative fractions


Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
parent 4a7f6b75
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ char *strmhz (char *buf, long hz) ...@@ -27,7 +27,7 @@ char *strmhz (char *buf, long hz)
long l, n; long l, n;
long m; long m;
n = DIV_ROUND(hz, 1000000L); n = DIV_ROUND(hz, 1000) / 1000L;
l = sprintf (buf, "%ld", n); l = sprintf (buf, "%ld", n);
hz -= n * 1000000L; hz -= n * 1000000L;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment