index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2020-05-13 14:43:53 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-06-01 10:59:08 +1000 |
commit | 23b50d60e34e324cf6f420c05293f7fa8a909623 (patch) | |
tree | 42a62adb3d3968f56d4564ae2b62bcf2c71cf4bd | |
parent | 3674144a74cfe897ec3ff46c18681df293290caa (diff) |
-rw-r--r-- | src/pacman/callback.c | 8 |
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 25909e02..4240a779 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -862,12 +862,14 @@ static void dload_progress_event(const char *filename, alpm_download_event_progr int64_t curr_time = get_time_ms(); double last_chunk_rate; int64_t timediff; + bool ok; if(!dload_progressbar_enabled()) { return; } - assert(find_bar_for_filename(filename, &index, &bar)); + ok = find_bar_for_filename(filename, &index, &bar); + assert(ok); /* compute current average values */ timediff = curr_time - bar->sync_time; @@ -902,12 +904,14 @@ static void dload_complete_event(const char *filename, alpm_download_event_compl int index; struct pacman_progress_bar *bar; int64_t timediff; + bool ok; if(!dload_progressbar_enabled()) { return; } - assert(find_bar_for_filename(filename, &index, &bar)); + ok = find_bar_for_filename(filename, &index, &bar); + assert(ok); bar->completed = true; /* This may not have been initialized if the download finished before |