index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aurelien Foret <aurelien@archlinux.org> | 2005-03-26 09:00:49 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-03-26 09:00:49 +0000 |
commit | 10b0e0d9af0e396d30f6fb1f5d321488897746d3 (patch) | |
tree | 54019ca547b4155aba371a5d9c5dd51d92406c1b /lib/libalpm | |
parent | 3f165e19129f4962231a2f4ce2fb581e8ba1ec9d (diff) |
-rw-r--r-- | lib/libalpm/list.c | 3 | ||||
-rw-r--r-- | lib/libalpm/list.h | 2 |
diff --git a/lib/libalpm/list.c b/lib/libalpm/list.c index 9b3b11e9..8fda583f 100644 --- a/lib/libalpm/list.c +++ b/lib/libalpm/list.c @@ -89,6 +89,9 @@ PMList* pm_list_add(PMList *list, void *data) ptr = list; if(ptr == NULL) { ptr = pm_list_new(); + if(ptr == NULL) { + return(NULL); + } } lp = pm_list_last(ptr); diff --git a/lib/libalpm/list.h b/lib/libalpm/list.h index fe0d6738..e7c9eb31 100644 --- a/lib/libalpm/list.h +++ b/lib/libalpm/list.h @@ -26,7 +26,7 @@ typedef struct __pmlist_t { void *data; struct __pmlist_t *prev; struct __pmlist_t *next; - struct __pmlist_t *last; + struct __pmlist_t *last; /* Quick access to last item in list */ } pmlist_t; typedef struct __pmlist_t PMList; |