summaryrefslogtreecommitdiffstats
path: root/src/pacman/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r--src/pacman/util.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index b39f51f8..96eb621e 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -274,7 +274,7 @@ void display_targets(alpm_list_t *syncpkgs)
for(i = syncpkgs; i; i = alpm_list_next(i)) {
pmsyncpkg_t *sync = alpm_list_getdata(i);
- pmpkg_t *pkg = alpm_sync_get_package(sync);
+ pmpkg_t *pkg = alpm_sync_get_pkg(sync);
/* If this sync record is a replacement, the data member contains
* a list of packages to be removed due to the package that is being
@@ -381,9 +381,14 @@ void fill_progress(const int percent, const int proglen)
const unsigned short chomp = alpm_option_get_chomp();
const unsigned int hashlen = proglen - 8;
const unsigned int hash = percent * hashlen / 100;
- unsigned int lasthash = 0, mouth = 0;
+ static unsigned int lasthash = 0, mouth = 0;
unsigned int i;
+ if(percent == 0) {
+ lasthash = 0;
+ mouth = 0;
+ }
+
printf(" [");
for(i = hashlen; i > 1; --i) {
/* if special progress bar enabled */