Fix coverity issue 05/173305/2 accepted/tizen/unified/20180322.060204 submit/tizen/20180322.015713
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 20 Mar 2018 10:49:12 +0000 (19:49 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 20 Mar 2018 10:50:32 +0000 (19:50 +0900)
CID-108868

Change-Id: Iccaf09d2f86b16e8a99b2d5c584ed878b9c69bf2
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
src/download-manager-viewItem.cpp

index c4b194b..cdc88e8 100755 (executable)
@@ -618,12 +618,7 @@ void ViewItem::getHumanFriendlyBytesStr(unsigned long long bytes,
                unsigned long long result_int = result >> fixed_point;
                unsigned long long result_fraction = result &
                        ~(0xFFFFFFFF << fixed_point);
-               if (unit == 0)
-                       snprintf(str, sizeof(str), "%llu.%.2llu %%", result_int,
-                                       result_fraction);
-               else
-                       snprintf(str, sizeof(str), "%llu.%.2llu %%", result_int,
-                                       result_fraction);
+               snprintf(str, sizeof(str), "%llu.%.2llu %%", result_int, result_fraction);
        } else {
                if (unit == 0)
                        snprintf(str, sizeof(str), "%llu %s", bytes, unitStr[unit]);