diff options
-rw-r--r-- | include/libbb.h | 3 | ||||
-rw-r--r-- | libbb/human_readable.c | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h index 750e0bb4f..a6d9a510b 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -267,7 +267,8 @@ enum { | |||
267 | MEGABYTE = (KILOBYTE*1024), | 267 | MEGABYTE = (KILOBYTE*1024), |
268 | GIGABYTE = (MEGABYTE*1024) | 268 | GIGABYTE = (MEGABYTE*1024) |
269 | }; | 269 | }; |
270 | const char *make_human_readable_str(unsigned long size, unsigned long block_size, unsigned long display_unit); | 270 | const char *make_human_readable_str(unsigned long long size, |
271 | unsigned long block_size, unsigned long display_unit); | ||
271 | 272 | ||
272 | int bb_ask_confirmation(void); | 273 | int bb_ask_confirmation(void); |
273 | int klogctl(int type, char * b, int len); | 274 | int klogctl(int type, char * b, int len); |
diff --git a/libbb/human_readable.c b/libbb/human_readable.c index 7bdad36a9..656889150 100644 --- a/libbb/human_readable.c +++ b/libbb/human_readable.c | |||
@@ -28,9 +28,8 @@ | |||
28 | #include <stdio.h> | 28 | #include <stdio.h> |
29 | #include "libbb.h" | 29 | #include "libbb.h" |
30 | 30 | ||
31 | const char *make_human_readable_str(unsigned long size, | 31 | const char *make_human_readable_str(unsigned long long size, |
32 | unsigned long block_size, | 32 | unsigned long block_size, unsigned long display_unit) |
33 | unsigned long display_unit) | ||
34 | { | 33 | { |
35 | /* The code will adjust for additional (appended) units. */ | 34 | /* The code will adjust for additional (appended) units. */ |
36 | 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' }; |
@@ -48,7 +47,7 @@ const char *make_human_readable_str(unsigned long size, | |||
48 | f = fmt; | 47 | f = fmt; |
49 | frac = 0; | 48 | frac = 0; |
50 | 49 | ||
51 | val = ((unsigned long long) size) * block_size; | 50 | val = size * block_size; |
52 | if (val == 0) { | 51 | if (val == 0) { |
53 | return u; | 52 | return u; |
54 | } | 53 | } |