diff options
author | Dan McGee <dan@archlinux.org> | 2011-03-07 22:34:30 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-03-07 22:34:30 +0100 |
commit | 36c570712a34cda92ce3c3362d07baff41ba0d04 (patch) | |
tree | 9d65ddb44562de4151ea3090f4f7f77d180add06 | |
parent | 36df611203860eaec77f76ee76cf277b8ab87435 (diff) | |
download | pacman-36c570712a34cda92ce3c3362d07baff41ba0d04.tar.gz pacman-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.c | 3 |
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", |