From 36c570712a34cda92ce3c3362d07baff41ba0d04 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 7 Mar 2011 15:34:30 -0600 Subject: 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 --- src/pacman/callback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pacman') 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", -- cgit v1.2.3-70-g09d2