summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-02-07 21:33:09 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-02-07 21:33:09 +0000
commitc5aca9529f755aeeeba490ddab067679ce1ae61c (patch)
treedb645c1da4cbdb9bbf8a5dd05c519d842926f41f
parentbbb48a85f07fbfd61672c5a8e3c332b62e67af41 (diff)
downloadpacman-c5aca9529f755aeeeba490ddab067679ce1ae61c.tar.xz
code factorization: take 2
-rw-r--r--lib/libalpm/sync.c4
1 files changed, 2 insertions, 2 deletions
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);