From 82b7e6de691151f9fbd997a0da44b99bb2c4841e Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Thu, 8 Feb 2018 16:54:27 -0600 Subject: [PATCH] Fix unused code (coverity defect #7520283) Due to the logic above, isz cannot be zero if we take the else branch. --- src/common.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/common.cpp b/src/common.cpp index 17da93408..55a753399 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -1848,11 +1848,7 @@ void format_size_safe(char buff[128], unsigned long long sz) { if (isz > 9) { append_ull(buff, isz, &idx, max_len); } else { - if (isz == 0) { - append_str(buff, "0", &idx, max_len); - } else { - append_ull(buff, isz, &idx, max_len); - } + append_ull(buff, isz, &idx, max_len); // Maybe append a single fraction digit. unsigned long long remainder = sz % 1024;