summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-03-29 22:34:47 +0000
committerBernhard Reutner-Fischer2006-03-29 22:34:47 +0000
commitd409c3a2f787dd2276d242d70e03b25e33436cea (patch)
treeadec7d9142ff4899bb9d0319bbbd5822359fbc0b /libbb
parentabaef6565e03b03fb750c7935737fd0309395729 (diff)
downloadbusybox-d409c3a2f787dd2276d242d70e03b25e33436cea.zip
busybox-d409c3a2f787dd2276d242d70e03b25e33436cea.tar.gz
- Rich Felker writes: fix invalid printf format strings
http://busybox.net/lists/busybox/2006-March/019568.html text data bss dec hex filename 900619 10316 1038724 1949659 1dbfdb busybox.oorig 900603 10316 1038724 1949643 1dbfcb busybox
Diffstat (limited to 'libbb')
-rw-r--r--libbb/human_readable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/human_readable.c b/libbb/human_readable.c
index ad9025c..cf029c0 100644
--- a/libbb/human_readable.c
+++ b/libbb/human_readable.c
@@ -33,8 +33,8 @@ const char *make_human_readable_str(unsigned long long size,
{
/* The code will adjust for additional (appended) units. */
static const char zero_and_units[] = { '0', 0, 'k', 'M', 'G', 'T' };
- static const char fmt[] = "%Lu";
- static const char fmt_tenths[] = "%Lu.%d%c";
+ static const char fmt[] = "%llu";
+ static const char fmt_tenths[] = "%llu.%d%c";
static char str[21]; /* Sufficient for 64 bit unsigned integers. */
@@ -74,7 +74,7 @@ const char *make_human_readable_str(unsigned long long size,
if ( frac >= 5 ) {
++val;
}
- f = "%Lu%*c" /* fmt_no_tenths */ ;
+ f = "%llu%*c" /* fmt_no_tenths */ ;
frac = 1;
}
#endif