summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/deps.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-28 09:45:24 +0200
committerAurelien Foret <aurelien@archlinux.org>2005-03-28 09:45:24 +0200
commit0ef95757d6fed29b99d1ea08b78732b2a7fe0e2c (patch)
tree533229e29f3d37f6cad859b97cc2d2d9b2dce6fd /lib/libalpm/deps.c
parent350a3972d1d372a009c67aba5af4ff0d3e25e813 (diff)
downloadpacman-0ef95757d6fed29b99d1ea08b78732b2a7fe0e2c.tar.gz
pacman-0ef95757d6fed29b99d1ea08b78732b2a7fe0e2c.tar.xz
added a FREELISTPTR macro to free a PMList without freeing its data
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r--lib/libalpm/deps.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 3e3bd267..9839014a 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -104,10 +104,7 @@ PMList *sortbydeps(PMList *targets, int mode)
}
if(clean && change) {
/* free up targets -- it's local now */
- for(i = targets; i; i = i->next) {
- i->data = NULL;
- }
- FREELIST(targets);
+ FREELISTPTR(targets);
}
targets = newtargs;
clean = 1;
@@ -116,10 +113,7 @@ PMList *sortbydeps(PMList *targets, int mode)
/* we're removing packages, so reverse the order */
newtargs = _alpm_list_reverse(targets);
/* free the old one */
- for(i = targets; i; i = i->next) {
- i->data = NULL;
- }
- FREELIST(targets);
+ FREELISTPTR(targets);
targets = newtargs;
}