summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 0bbf0755..dd99313a 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -193,10 +193,7 @@ int add_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data)
_alpm_log(PM_LOG_FLOW1, "sorting by dependencies");
lp = sortbydeps(trans->packages, PM_TRANS_TYPE_ADD);
/* free the old alltargs */
- for(j = trans->packages; j; j = j->next) {
- j->data = NULL;
- }
- FREELIST(trans->packages);
+ FREELISTPTR(trans->packages);
trans->packages = lp;
TRANS_CB(trans, PM_TRANS_EVT_DEPS_DONE, NULL, NULL);
@@ -384,13 +381,9 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
cache, thus eliminating the need for db_scan(DEPENDS) */
PMList *provides = _alpm_db_whatprovides(db, depend.name);
if(provides) {
- PMList *p;
/* use the first one */
depinfo = db_scan(db, ((pmpkg_t *)provides->data)->name, INFRQ_DESC|INFRQ_DEPENDS);
- for(p = provides; p; p = p->next) {
- p->data = NULL;
- }
- FREELIST(provides);
+ FREELISTPTR(provides);
if(depinfo == NULL) {
/* wtf */
continue;