diff options
author | 2020-12-23 17:29:59 -0800 | |
---|---|---|
committer | 2022-04-22 13:20:33 +0200 | |
commit | 78040882a30666f29985bc6589be03cbc7d7cfbe (patch) | |
tree | 1f0e8bee6c1501db8feaaf0cd6c9b59c1732e661 | |
parent | 3de1317378cd6b2b9e747008f10dc386334a391a (diff) | |
download | libimobiledevice-78040882a30666f29985bc6589be03cbc7d7cfbe.tar.gz libimobiledevice-78040882a30666f29985bc6589be03cbc7d7cfbe.tar.bz2 |
[clang-tidy] idevicebackup: Fix bad floating point cast
Found with bugprone-integer-division
Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r-- | tools/idevicebackup.c | 5 |
1 files changed, 2 insertions, 3 deletions
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[]) | |||
1141 | if ((!is_manifest)) { | 1141 | if ((!is_manifest)) { |
1142 | if (hunk_index == 0 && file_status == DEVICE_LINK_FILE_STATUS_LAST_HUNK) { | 1142 | if (hunk_index == 0 && file_status == DEVICE_LINK_FILE_STATUS_LAST_HUNK) { |
1143 | print_progress(100); | 1143 | print_progress(100); |
1144 | } else { | 1144 | } else if (file_size > 0) { |
1145 | if (file_size > 0) | 1145 | print_progress((double)(file_size_current*100)/file_size); |
1146 | print_progress((double)((file_size_current*100)/file_size)); | ||
1147 | } | 1146 | } |
1148 | } | 1147 | } |
1149 | 1148 | ||