summaryrefslogtreecommitdiffstats
path: root/src/pacman/callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/callback.c')
-rw-r--r--src/pacman/callback.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index aec9753a..3061d2a0 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -396,8 +396,9 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent,
oprlen = strlen(opr);
wcopr = calloc(oprlen, sizeof(wchar_t));
if(!wcopr) {
- fprintf(stderr, "malloc failure: could not allocate %d bytes\n",
+ fprintf(stderr, "malloc failure: could not allocate %zd bytes\n",
strlen(opr) * sizeof(wchar_t));
+ return;
}
oprlen = mbstowcs(wcopr, opr, oprlen);