From: Chris Mason Date: Mon, 12 May 2008 17:01:57 +0000 (-0400) Subject: Fix the pretty print code for num_bytes == 0 X-Git-Tag: upstream/0.20.rc1~262 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d160150c8bf255b1dee65cab7488ac2529433a39;p=platform%2Fupstream%2Fbtrfs-progs.git Fix the pretty print code for num_bytes == 0 --- diff --git a/utils.c b/utils.c index 44a5dc6..335c9cb 100644 --- a/utils.c +++ b/utils.c @@ -792,6 +792,8 @@ char *pretty_sizes(u64 size) size /= 1024; num_divs++; } + if (num_divs == 0) + num_divs = 1; if (num_divs > ARRAY_SIZE(size_strs)) return NULL;