diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-29 22:34:47 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-29 22:34:47 +0000 |
commit | a861bc8168145bf86cf9a28eac0da25cc2f89fe8 (patch) | |
tree | adec7d9142ff4899bb9d0319bbbd5822359fbc0b /libbb | |
parent | 9d1913202d9516dccdd2d2fd4ab0094b62af158f (diff) | |
download | busybox-w32-a861bc8168145bf86cf9a28eac0da25cc2f89fe8.tar.gz busybox-w32-a861bc8168145bf86cf9a28eac0da25cc2f89fe8.tar.bz2 busybox-w32-a861bc8168145bf86cf9a28eac0da25cc2f89fe8.zip |
- 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
git-svn-id: svn://busybox.net/trunk/busybox@14697 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/human_readable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/human_readable.c b/libbb/human_readable.c index ad9025c08..cf029c0a2 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, | |||
33 | { | 33 | { |
34 | /* The code will adjust for additional (appended) units. */ | 34 | /* The code will adjust for additional (appended) units. */ |
35 | static const char zero_and_units[] = { '0', 0, 'k', 'M', 'G', 'T' }; | 35 | static const char zero_and_units[] = { '0', 0, 'k', 'M', 'G', 'T' }; |
36 | static const char fmt[] = "%Lu"; | 36 | static const char fmt[] = "%llu"; |
37 | static const char fmt_tenths[] = "%Lu.%d%c"; | 37 | static const char fmt_tenths[] = "%llu.%d%c"; |
38 | 38 | ||
39 | static char str[21]; /* Sufficient for 64 bit unsigned integers. */ | 39 | static char str[21]; /* Sufficient for 64 bit unsigned integers. */ |
40 | 40 | ||
@@ -74,7 +74,7 @@ const char *make_human_readable_str(unsigned long long size, | |||
74 | if ( frac >= 5 ) { | 74 | if ( frac >= 5 ) { |
75 | ++val; | 75 | ++val; |
76 | } | 76 | } |
77 | f = "%Lu%*c" /* fmt_no_tenths */ ; | 77 | f = "%llu%*c" /* fmt_no_tenths */ ; |
78 | frac = 1; | 78 | frac = 1; |
79 | } | 79 | } |
80 | #endif | 80 | #endif |