index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2012-02-01 03:11:47 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-01-31 11:22:30 -0600 |
commit | fcbae69fe81d080478bbd9809af5696bbbfe9d95 (patch) | |
tree | 1fc1afc5d45baf6d41f06a34b1f3f2dcf46c8f15 /lib | |
parent | 9d1e8084dfa0a1ebae6c37e3b839289cb905116f (diff) |
-rw-r--r-- | lib/libalpm/alpm_list.c | 5 |
diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index 15286aa1..3aa4f9bc 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -279,8 +279,11 @@ alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, size_t n, alpm_list_fn alpm_list_t *left = list; alpm_list_t *lastleft = alpm_list_nth(list, n/2 - 1); alpm_list_t *right = lastleft->next; - /* terminate first list */ + + /* tidy new lists */ lastleft->next = NULL; + right->prev = left->prev; + left->prev = lastleft; left = alpm_list_msort(left, n/2, fn); right = alpm_list_msort(right, n - (n/2), fn); |