diff options
-rw-r--r-- | src/state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c index 3dc2b9b..3b93fc1 100644 --- a/src/state.c +++ b/src/state.c @@ -53,7 +53,7 @@ static int apk_state_add_change(struct apk_state *state, return -1; list_init(&change->change_list); - list_add(&change->change_list, &state->change_list_head); + list_add_tail(&change->change_list, &state->change_list_head); change->oldpkg = oldpkg; change->newpkg = newpkg; @@ -275,7 +275,7 @@ int apk_state_satisfy_deps(struct apk_state *state, if (deps == NULL) return 0; - for (i = deps->num - 1; i >= 0; i--) { + for (i = 0; i < deps->num; i++) { name = deps->item[i].name; if (name->pkgs == NULL) { apk_error("No providers for '%s'", name->name); |