summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-20 22:56:20 +0200
committerDan McGee <dan@archlinux.org>2011-09-21 00:15:09 +0200
commit47dd31560906fdd87f547940f5c7656d94d52b1b (patch)
tree44653904bfc3cd91f178a341142e4a24399de96d
parent8375ad214a2a8d6e01430f432aa7957688d8ec52 (diff)
downloadpacman-47dd31560906fdd87f547940f5c7656d94d52b1b.tar.gz
pacman-47dd31560906fdd87f547940f5c7656d94d52b1b.tar.xz
Fix int/size_t type in alpm_list_count() call
alpm_list_count() returns size_t, which we should use to store the result since it is easy enough to format for printing. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/callback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 4fdd8f37..a01fc07e 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -318,9 +318,9 @@ void cb_question(alpm_question_t event, void *data1, void *data2,
case ALPM_QUESTION_SELECT_PROVIDER:
{
alpm_list_t *providers = (alpm_list_t *)data1;
- int count = alpm_list_count(providers);
+ size_t count = alpm_list_count(providers);
char *depstring = alpm_dep_compute_string((alpm_depend_t *)data2);
- printf(_(":: There are %d providers available for %s:\n"), count,
+ printf(_(":: There are %zd providers available for %s:\n"), count,
depstring);
free(depstring);
select_display(providers);