"0" tickmark can effectively be shortened by dividing by
any number as 0 / anything is still 0, but the code was
considering "0" to be unshortenable.
Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
str = tm[i].string;
l = strlen(str);
str = tm[i].string;
l = strlen(str);
+ if (strcmp(str, "0") == 0)
+ continue;
if (l > 9 && strcmp(&str[l - 9], "000000000") == 0) {
*power_of_ten = 9;
shorten_char = use_KMG_symbols ? 'G' : '\0';
if (l > 9 && strcmp(&str[l - 9], "000000000") == 0) {
*power_of_ten = 9;
shorten_char = use_KMG_symbols ? 'G' : '\0';