Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c4
-rw-r--r--src/pacman/pacman.c2
-rw-r--r--src/pacman/util.c2
3 files changed, 5 insertions, 3 deletions
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;
}