From d311ad067f47608252b9276df90087db98b1100f Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Fri, 16 Nov 2007 20:50:58 +0100 Subject: Generalized alpm_list_find. The old alpm_list_find was renamed to alpm_list_find_ptr, and a new alpm_list_find was introduced, which uses the fn comparison-function parameter in its decision. Now both alpm_list_find_ptr (a new ptrcmp helper function was also added) and alpm_list_find_str are just an alpm_list_find call. Signed-off-by: Nagy Gabor Signed-off-by: Chantry Xavier [Dan: made ptrcmp a static function] Signed-off-by: Dan McGee --- lib/libalpm/add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index ea661dc4..a85c4d82 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -282,7 +282,7 @@ static int upgrade_remove(pmpkg_t *oldpkg, pmpkg_t *newpkg, pmtrans_t *trans, pm for(b = alpm_pkg_get_backup(newpkg); b; b = b->next) { const char *backup = b->data; /* make sure we don't add duplicate entries */ - if(!alpm_list_find(handle->noupgrade, backup)) { + if(!alpm_list_find_ptr(handle->noupgrade, backup)) { _alpm_log(PM_LOG_DEBUG, "adding %s to the NoUpgrade array temporarily\n", backup); handle->noupgrade = alpm_list_add(handle->noupgrade, strdup(backup)); -- cgit v1.2.3-70-g09d2