From bf7c199b648e36be3cc68410d1f572ffbe2007d1 Mon Sep 17 00:00:00 2001 From: "josh.macdonald" Date: Sat, 24 Mar 2007 13:23:06 +0000 Subject: Use 1024 instead of 1000 for KB/MB/GB calculations. --- xdelta3/xdelta3-main.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xdelta3/xdelta3-main.h') diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index a912a1f..284f115 100644 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h @@ -535,12 +535,12 @@ main_format_bcnt (xoff_t r, char *buf) for (i = 0; i < SIZEOF_ARRAY(fmts); i += 1) { - if (r < 10 * 1e3 || i == (-1 + (int)SIZEOF_ARRAY(fmts))) + if (r <= (10 * 1024) || i == (-1 + (int)SIZEOF_ARRAY(fmts))) { sprintf (buf, "%"Q"u %s", r, fmts[i]); break; } - r /= 1000; + r /= 1024; } return buf; } -- cgit v1.2.3