From f12ead2cf278d4a9b330d0d320733960fc750e96 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 24 Jun 2011 00:40:03 -0500 Subject: Remove three unnecessary usages of alpm_list_count() For the files count when loading from a package, we can keep a counter. The two in the frontend were completely useless due to the fact that if sync_dbs is non-NULL, alpm_list_count() will always be greater than 0. Signed-off-by: Dan McGee --- src/pacman/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pacman/query.c') diff --git a/src/pacman/query.c b/src/pacman/query.c index aa779075..62472cb7 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -502,7 +502,7 @@ int pacman_query(alpm_list_t *targets) if(config->op_q_foreign) { /* ensure we have at least one valid sync db set up */ alpm_list_t *sync_dbs = alpm_option_get_syncdbs(config->handle); - if(sync_dbs == NULL || alpm_list_count(sync_dbs) == 0) { + if(sync_dbs == NULL) { pm_printf(PM_LOG_ERROR, _("no usable package repositories configured.\n")); return 1; } -- cgit v1.2.3