index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2017-04-15 17:28:37 -0400 |
---|---|---|
committer | Andrew Gregory <andrew.gregory.8@gmail.com> | 2017-04-16 08:29:55 -0400 |
commit | a8670304c9393cbff350fcff7234d8f166dbcf60 (patch) | |
tree | 5cd193b3556d71900e77e2ed76d68609cd9eb34b /lib/libalpm/deps.c | |
parent | 098e114f586df383e5c3863fadbf4958b5b244e6 (diff) |
-rw-r--r-- | lib/libalpm/deps.c | 8 |
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 01e550a4..f55d6074 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -231,19 +231,19 @@ alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle, while(vptr) { /* mark that we touched the vertex */ vertex->state = ALPM_GRAPH_STATE_PROCESSING; - int found = 0; - while(vertex->iterator && !found) { + int switched_to_child = 0; + while(vertex->iterator && !switched_to_child) { alpm_graph_t *nextchild = vertex->iterator->data; vertex->iterator = vertex->iterator->next; if(nextchild->state == ALPM_GRAPH_STATE_UNPROCESSED) { - found = 1; + switched_to_child = 1; nextchild->parent = vertex; vertex = nextchild; } else if(nextchild->state == ALPM_GRAPH_STATE_PROCESSING) { _alpm_warn_dep_cycle(handle, targets, vertex, nextchild, reverse); } } - if(!found) { + if(!switched_to_child) { if(alpm_list_find_ptr(targets, vertex->data)) { newtargs = alpm_list_add(newtargs, vertex->data); } |