From c5aca9529f755aeeeba490ddab067679ce1ae61c Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Tue, 7 Feb 2006 21:33:09 +0000 Subject: code factorization: take 2 --- lib/libalpm/sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index ecc57ed3..0b3fc1b5 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -492,8 +492,8 @@ int sync_prepare(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, PMList ** /* figure out which one was requested in targets. If they both were, * then it's still an unresolvable conflict. */ - target = pm_list_is_strin(miss->depend.name, trans->targets); - depend = pm_list_is_strin(miss->target, trans->targets); + target = pm_list_is_strin(miss->target, trans->targets) ? miss->target : NULL; + depend = pm_list_is_strin(miss->depend.name, trans->targets) ? miss->depend.name : NULL; if(depend && !target) { _alpm_log(PM_LOG_DEBUG, "%s is in the target list -- keeping it", miss->depend.name); -- cgit v1.2.3-24-g4f1b