From 78040882a30666f29985bc6589be03cbc7d7cfbe Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 23 Dec 2020 17:29:59 -0800 Subject: [clang-tidy] idevicebackup: Fix bad floating point cast Found with bugprone-integer-division Signed-off-by: Rosen Penev --- tools/idevicebackup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/idevicebackup.c') diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index 1759f50..483f3d6 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c @@ -1141,9 +1141,8 @@ int main(int argc, char *argv[]) if ((!is_manifest)) { if (hunk_index == 0 && file_status == DEVICE_LINK_FILE_STATUS_LAST_HUNK) { print_progress(100); - } else { - if (file_size > 0) - print_progress((double)((file_size_current*100)/file_size)); + } else if (file_size > 0) { + print_progress((double)(file_size_current*100)/file_size); } } -- cgit v1.1-32-gdbae