summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/list.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-31 07:39:59 +0100
committerAaron Griffin <aaron@archlinux.org>2006-10-31 07:39:59 +0100
commitaf2fb3324a925af6caa9d53aacac92173fc47885 (patch)
treeb7abb647d27db75a1d937eea24cd5eccac6e5db8 /lib/libalpm/list.c
parent78c0badc9b3629c5156d4bd0733a3e9a1e4e92c6 (diff)
downloadpacman-af2fb3324a925af6caa9d53aacac92173fc47885.tar.gz
pacman-af2fb3324a925af6caa9d53aacac92173fc47885.tar.xz
Numerous changes:
* Furthered the "lazy caching" to force the pkgcache to read nothing (INFRQ_NONE) by default. Anything requiring package data should now check the infolevel of each package and attempt to update it. This could be ironed out a bit more later (by using the front-end get_info function * Switched to libfetch. Drastic changes to the download code and the callback progress bar functions. Also fixed the return value of _alpm_downloadfiles_forreal. Downloading now supports http, ftp, https, and files urls, along with 'mtime's and numerous other fancy features from libfetch.
Diffstat (limited to 'lib/libalpm/list.c')
-rw-r--r--lib/libalpm/list.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libalpm/list.c b/lib/libalpm/list.c
index be41a462..0f48030b 100644
--- a/lib/libalpm/list.c
+++ b/lib/libalpm/list.c
@@ -26,6 +26,7 @@
#include <assert.h>
/* pacman */
#include "list.h"
+#include "util.h"
pmlist_t *_alpm_list_new()
{
@@ -48,10 +49,10 @@ void _alpm_list_free(pmlist_t *list, _alpm_fn_free fn)
while(it) {
ptr = it->next;
- if(fn) {
+ if(fn && it->data) {
fn(it->data);
}
- free(it);
+ FREE(it);
it = ptr;
}
}
@@ -180,7 +181,7 @@ pmlist_t *_alpm_list_remove(pmlist_t *haystack, void *needle, _alpm_fn_cmp fn, v
*data = i->data;
}
i->data = NULL;
- free(i);
+ FREE(i);
}
return(haystack);