cppcheck fixes

This commit is contained in:
iceman1001 committed 2022-01-08 15:29:11 +01:00
1 parent 5ff043e5ab
commit 0254b2a63a
3 files changed
+14 -4

No files matched your search

+4 -2
View File
@@ -648,6 +648,10 @@ void print_progress(size_t count, uint64_t max, barMode_t style) {
int rows;
rl_reset_screen_size(); // refresh Readline idea of the actual screen width
rl_get_screen_size(&rows, &cols);
if (cols < 36)
return;
(void) rows;
if (prev_cols > cols) {
PrintAndLogEx(NORMAL, _CLEAR_ _TOP_ "");
@@ -655,8 +659,6 @@ void print_progress(size_t count, uint64_t max, barMode_t style) {
prev_cols = cols;
#endif
int width = cols - 35;
if (width < 1)
return;
#define PERCENTAGE(V, T) ((V * width) / T)
// x/8 fractional part of the percentage