summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-01-18 16:20:55 +0200
committerTimo Teräs <timo.teras@iki.fi>2013-01-18 16:20:55 +0200
commitcb15b31b7929acd6acfd06e24038b2914c7cfac5 (patch)
treefa81052eb77c1a29eb7783f746f1e0d9807ceb6a
parent3c400707525d4cb401eab1c72d82cfdf0814148f (diff)
downloadapk-tools-cb15b31b7929acd6acfd06e24038b2914c7cfac5.tar.gz
apk-tools-cb15b31b7929acd6acfd06e24038b2914c7cfac5.tar.bz2
apk-tools-cb15b31b7929acd6acfd06e24038b2914c7cfac5.tar.xz
apk-tools-cb15b31b7929acd6acfd06e24038b2914c7cfac5.zip
solver: some code clean ups
-rw-r--r--src/solver.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/solver.c b/src/solver.c
index c12d038..d87b1f0 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -945,7 +945,7 @@ static int next_branch(struct apk_solver_state *ss)
name->name, d->saved_requirers, name->ss.requirers);
#endif
- if ((backjump_name == NULL || backjump_name == d->name) &&
+ if ((backjump_name == NULL || backjump_name == name) &&
backup_until >= ss->num_decisions &&
d->branching_point == BRANCH_YES) {
d->branching_point = BRANCH_NO;
@@ -955,19 +955,19 @@ static int next_branch(struct apk_solver_state *ss)
if (backup_until < ss->num_decisions)
dbg_printf("skipping %s, %d < %d\n",
name->name, backup_until, ss->num_decisions);
- else if (backjump_name != NULL && backjump_name != d->name)
+ else if (backjump_name != NULL && backjump_name != name)
dbg_printf("backjumping to find new assign candidate for %s\n",
backjump_name->name);
}
/* Back jump to find assign candidate for this name */
- if (d->name->ss.backjump_enabled && backjump_name == NULL)
- backjump_name = d->name;
+ if (name->ss.backjump_enabled && backjump_name == NULL)
+ backjump_name = name;
/* When undoing the initial "exclude none" decision, check if
* we can backjump. */
if (d->has_package == 0 && !d->found_solution) {
- if (backjump_name == d->name) {
+ if (backjump_name == name) {
d->name->ss.backjump_enabled = 0;
backjump_name = NULL;
}