From: Ed Swarthout Date: Sat, 5 Mar 2011 16:28:17 +0000 (-0600) Subject: strmhz: Make hz unsigned to support greater than 2146 MHz clock X-Git-Tag: v2011.03-rc2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=55f7934d2b07a62027cb05484ea3f10666a855d1;p=u-boot strmhz: Make hz unsigned to support greater than 2146 MHz clock For example, an input of 0x80000000 should print: 2147.484 instead of -2147.-483. Signed-off-by: Ed Swarthout Signed-off-by: Kumar Gala --- diff --git a/include/common.h b/include/common.h index d8c912d092..893af5cc10 100644 --- a/include/common.h +++ b/include/common.h @@ -648,7 +648,7 @@ int sprintf(char * buf, const char *fmt, ...) int vsprintf(char *buf, const char *fmt, va_list args); /* lib/strmhz.c */ -char * strmhz(char *buf, long hz); +char * strmhz(char *buf, unsigned long hz); /* lib/crc32.c */ #include diff --git a/lib/strmhz.c b/lib/strmhz.c index d6da1d136e..89f2263aee 100644 --- a/lib/strmhz.c +++ b/lib/strmhz.c @@ -22,7 +22,7 @@ */ #include -char *strmhz (char *buf, long hz) +char *strmhz (char *buf, unsigned long hz) { long l, n; long m;