Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-29 13:34:51 -0600
committerDan McGee <dan@archlinux.org>2011-01-29 13:34:51 -0600
commit2e1b5c96a639e4196c018dff0ad05ba0027f303c (patch)
tree2f6de356e06168810b7532d84f1ec70369e615bf /src
parente263cf7231c5d6ec41a15cd6230dbd794b58287a (diff)
Call count() once in callback
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 53a56817..f1e71bb4 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -285,6 +285,7 @@ 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);
for (i = unresolved; i; i = i->next) {
namelist = alpm_list_add(namelist,
(char *)alpm_pkg_get_name(i->data));
@@ -292,13 +293,13 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
printf(_n(
":: The following package cannot be upgraded due to unresolvable dependencies:\n",
":: The following packages cannot be upgraded due to unresolvable dependencies:\n",
- alpm_list_count(namelist)));
+ count));
list_display(" ", namelist);
printf("\n");
*response = noyes(_n(
"Do you want to skip the above package for this upgrade?",
"Do you want to skip the above packages for this upgrade?",
- alpm_list_count(namelist)));
+ count));
alpm_list_free(namelist);
}
break;