src/pacman/: use the FREELIST macro when possible.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Chantry Xavier 2007-12-08 09:58:49 +01:00 committed by Dan McGee
parent 4437033d2a
commit b6acb30aae
4 changed files with 4 additions and 9 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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;

View File

@ -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"),