summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-12-08 09:58:49 +0100
committerDan McGee <dan@archlinux.org>2007-12-08 21:56:40 -0600
commitb6acb30aae5504736fd23f97402389baabbddb1b (patch)
treec81bf2ca06179b1b02679e4e461b05c01a7dddfc
parent4437033d2a822d41820c67ab98d95db97daa7fd8 (diff)
downloadpacman-b6acb30aae5504736fd23f97402389baabbddb1b.tar.xz
src/pacman/: use the FREELIST macro when possible.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/add.c3
-rw-r--r--src/pacman/callback.c4
-rw-r--r--src/pacman/remove.c3
-rw-r--r--src/pacman/sync.c3
4 files changed, 4 insertions, 9 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c
index e04707f2..607ac1f0 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -175,8 +175,7 @@ int pacman_add(alpm_list_t *targets)
break;
}
add_cleanup();
- alpm_list_free_inner(data, free);
- alpm_list_free(data);
+ FREELIST(data);
return(1);
}
alpm_list_free(data);
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 3389ed85..05aec140 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -420,9 +420,7 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent,
printf("%s", (char *)i->data);
}
fflush(stdout);
- alpm_list_free_inner(output, free);
- alpm_list_free(output);
- output = NULL;
+ FREELIST(output);
} else {
on_progress = 1;
}
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 1028d9e8..ae2595a5 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -133,8 +133,7 @@ int pacman_remove(alpm_list_t *targets)
depstring);
free(depstring);
}
- alpm_list_free_inner(data, free);
- alpm_list_free(data);
+ FREELIST(data);
break;
default:
break;
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 9cf781a9..df102af2 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -717,8 +717,7 @@ static int sync_trans(alpm_list_t *targets, int sync_only)
/* Step 4: release transaction resources */
cleanup:
if(data) {
- alpm_list_free_inner(data, free);
- alpm_list_free(data);
+ FREELIST(data);
}
if(alpm_trans_release() == -1) {
fprintf(stderr, _("error: failed to release transaction (%s)\n"),