index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Xavier Chantry <shiningxc@gmail.com> | 2009-12-05 01:50:09 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-03-14 19:25:48 -0500 |
commit | 1aa1d00248ac89fb02e762b96c58559a04679b2e (patch) | |
tree | 0326bf37268fa6167f4b17e38b58bda598a82da4 /src | |
parent | be2f43191d0d0cdf02d72ac72a013697b0f7e879 (diff) |
-rw-r--r-- | src/pacman/callback.c | 4 | ||||
-rw-r--r-- | src/pacman/pacman.c | 2 | ||||
-rw-r--r-- | src/pacman/util.c | 2 |
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index d2d94d9b..b021d9db 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -371,6 +371,8 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent, case PM_TRANS_PROGRESS_CONFLICTS_START: opr = _("checking for file conflicts"); break; + default: + return; } /* find # of digits in package counts to scale output */ @@ -517,7 +519,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total) gettimeofday(&initial_time, NULL); xfered_last = (off_t)0; rate_last = 0.0; - timediff = get_update_timediff(1); + get_update_timediff(1); } } else if(file_xfered == file_total) { /* compute final values */ diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index d4385ebc..4559f8c6 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -219,7 +219,7 @@ static void setarch(const char *arch) static void cleanup(int ret) { /* free alpm library resources */ if(alpm_release() == -1) { - pm_printf(PM_LOG_ERROR, alpm_strerrorlast()); + pm_printf(PM_LOG_ERROR, "%s\n", alpm_strerrorlast()); } /* free memory */ diff --git a/src/pacman/util.c b/src/pacman/util.c index fb6f5219..e421e9d5 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -229,7 +229,7 @@ void indentprint(const char *str, int indent) p = wcstr; cidx = indent; - if(!p) { + if(!p || !len) { return; } |