summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2006-10-27 09:05:02 +0000
committerDenis Vlasenko2006-10-27 09:05:02 +0000
commitdca0b707c0f0998670f8e69600cc30d94e9b217b (patch)
treebf0291a625fee415b6500007b0ec90880104f962 /libbb
parent621204bbf6750f1ba3977b43bb35375ddda6b5ae (diff)
downloadbusybox-dca0b707c0f0998670f8e69600cc30d94e9b217b.zip
busybox-dca0b707c0f0998670f8e69600cc30d94e9b217b.tar.gz
reshuffle libbb.h contents so that order of decls makes sense
Found bad typo in largefile support :)
Diffstat (limited to 'libbb')
-rw-r--r--libbb/human_readable.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libbb/human_readable.c b/libbb/human_readable.c
index 115fde7..ff1b551 100644
--- a/libbb/human_readable.c
+++ b/libbb/human_readable.c
@@ -58,12 +58,13 @@ const char *make_human_readable_str(unsigned long long size,
val /= display_unit; /* Don't combine with the line above!!! */
} else {
++u;
- while ((val >= KILOBYTE)
- && (u < zero_and_units + sizeof(zero_and_units) - 1)) {
+ while ((val >= 1024)
+ && (u < zero_and_units + sizeof(zero_and_units) - 1)
+ ) {
f = fmt_tenths;
++u;
- frac = ((((int)(val % KILOBYTE)) * 10) + (KILOBYTE/2)) / KILOBYTE;
- val /= KILOBYTE;
+ frac = (((int)(val % 1024)) * 10 + 1024/2) / 1024;
+ val /= 1024;
}
if (frac >= 10) { /* We need to round up here. */
++val;