summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-07 15:34:30 -0600
committerDan McGee <dan@archlinux.org>2011-03-07 15:34:30 -0600
commit36c570712a34cda92ce3c3362d07baff41ba0d04 (patch)
tree9d65ddb44562de4151ea3090f4f7f77d180add06
parent36df611203860eaec77f76ee76cf277b8ab87435 (diff)
downloadpacman-36c570712a34cda92ce3c3362d07baff41ba0d04.tar.xz
Fix value of ngettext() count parameter in callback
I was awesome and ran alpm_list_count() on an empty list. Fail. Signed-off-by: Dan McGee <dan@archlinux.org>
-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 a80172b2..5edcc966 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -285,10 +285,11 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
{
alpm_list_t *unresolved = (alpm_list_t *) data1;
alpm_list_t *namelist = NULL, *i;
- size_t count = alpm_list_count(namelist);
+ size_t count = 0;
for (i = unresolved; i; i = i->next) {
namelist = alpm_list_add(namelist,
(char *)alpm_pkg_get_name(i->data));
+ count++;
}
printf(_n(
":: The following package cannot be upgraded due to unresolvable dependencies:\n",