summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proxy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/proxy.c b/proxy.c
index 1ec9541..630d8d2 100644
--- a/proxy.c
+++ b/proxy.c
@@ -22,11 +22,11 @@ format_bytes(char *buf, size_t len, uint64_t val)
const char *suffix = "B";
tmp = val * 10;
- if (val > 1125899906842624ULL) {
- if (val > (9223372036854775807ULL / 10))
- tmp = val / 112589990684262ULL;
- else
- tmp /= 1125899906842624ULL;
+ if (tx > 1152921504606846976ULL) {
+ tmp = val / 115292150460684697ULL;
+ suffix= "EiB";
+ } else if (tx > 1125899906842624ULL) {
+ tmp /= 1125899906842624ULL;
suffix = "PiB";
} else if (val > 1099511627776ULL) {
tmp /= 1099511627776ULL;