mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 17:31:52 -05:00
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:
parent
4437033d2a
commit
b6acb30aae
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user