index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-23 01:34:58 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-23 01:34:58 +0000 |
commit | 4db24ca28a31d1d0d97b30b186fd5255a0ae0113 (patch) | |
tree | 0ffe8319426d9ad84a6563883c445fc0fa0d6f40 /lib/libalpm/alpm_list.c | |
parent | 2a8b835dda8cf38636cad618bc01b433ef9eefa5 (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 a43f8211..26fcb3dc 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -145,8 +145,10 @@ alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cm if(prev != NULL) { prev->next = add; /* In middle. */ + } else { + list = add; /* At beginning, or new list */ } - + return(list); } } @@ -369,6 +371,7 @@ alpm_list_t *alpm_list_last(alpm_list_t *list) */ void *alpm_list_getdata(const alpm_list_t *entry) { + if(entry == NULL) return(NULL); return(entry->data); } |