diff --git a/src/progress_bar.c b/src/progress_bar.c
index 601b7ba3fa55ee3650a56d3329b84a66d85641b4..590b7bef974dce5e7c80ca60aab1cca0be28e31c 100644 (file)
--- a/src/progress_bar.c
+++ b/src/progress_bar.c
static bool
progress_bar_calc(struct progress_bar *p)
{
- unsigned old_width;
-
if (p->max == 0)
return false;
- old_width = p->width;
+ unsigned old_width = p->width;
p->width = (p->window.cols * p->current) / (p->max + 1);
assert(p->width < p->window.cols);
bool
progress_bar_set(struct progress_bar *p, unsigned current, unsigned max)
{
- bool modified;
-
assert(p != NULL);
if (current > max)
current = max;
- modified = (max == 0) != (p->max == 0);
+ bool modified = (max == 0) != (p->max == 0);
p->max = max;
p->current = current;