aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-27 09:05:02 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-27 09:05:02 +0000
commite7c6f0b4c27e36a1331ae7310bfa0549ead33849 (patch)
treebf0291a625fee415b6500007b0ec90880104f962 /libbb
parent9bc0f50defc28a31a2d214e654ec48e2a1bcc897 (diff)
downloadbusybox-w32-e7c6f0b4c27e36a1331ae7310bfa0549ead33849.tar.gz
busybox-w32-e7c6f0b4c27e36a1331ae7310bfa0549ead33849.tar.bz2
busybox-w32-e7c6f0b4c27e36a1331ae7310bfa0549ead33849.zip
reshuffle libbb.h contents so that order of decls makes sense
Found bad typo in largefile support :) git-svn-id: svn://busybox.net/trunk/busybox@16453 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 115fde744..ff1b55141 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,
58 val /= display_unit; /* Don't combine with the line above!!! */ 58 val /= display_unit; /* Don't combine with the line above!!! */
59 } else { 59 } else {
60 ++u; 60 ++u;
61 while ((val >= KILOBYTE) 61 while ((val >= 1024)
62 && (u < zero_and_units + sizeof(zero_and_units) - 1)) { 62 && (u < zero_and_units + sizeof(zero_and_units) - 1)
63 ) {
63 f = fmt_tenths; 64 f = fmt_tenths;
64 ++u; 65 ++u;
65 frac = ((((int)(val % KILOBYTE)) * 10) + (KILOBYTE/2)) / KILOBYTE; 66 frac = (((int)(val % 1024)) * 10 + 1024/2) / 1024;
66 val /= KILOBYTE; 67 val /= 1024;
67 } 68 }
68 if (frac >= 10) { /* We need to round up here. */ 69 if (frac >= 10) { /* We need to round up here. */
69 ++val; 70 ++val;