index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2011-07-04 11:17:12 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-07-05 10:22:11 -0500 |
commit | 24324ff0e12a3e19cada669a4c5c391e486790a3 (patch) | |
tree | bb211091670af259881bd326d5e034efea7eae26 /lib/libalpm/alpm_list.c | |
parent | 97103f860d48e1f6f9c0dd7c75568618f8ed5163 (diff) |
-rw-r--r-- | lib/libalpm/alpm_list.c | 7 |
diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index 38cefa62..071cd994 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -547,11 +547,10 @@ inline alpm_list_t SYMEXPORT *alpm_list_next(const alpm_list_t *node) * * @return the previous element, or NULL when no previous element exist */ -inline alpm_list_t SYMEXPORT *alpm_list_previous(const alpm_list_t *list, - const alpm_list_t *node) +inline alpm_list_t SYMEXPORT *alpm_list_previous(const alpm_list_t *list) { - if(node && node != list) { - return node->prev; + if(list && list->prev->next) { + return list->prev; } else { return NULL; } |