mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04: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;
|
break;
|
||||||
}
|
}
|
||||||
add_cleanup();
|
add_cleanup();
|
||||||
alpm_list_free_inner(data, free);
|
FREELIST(data);
|
||||||
alpm_list_free(data);
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
alpm_list_free(data);
|
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);
|
printf("%s", (char *)i->data);
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
alpm_list_free_inner(output, free);
|
FREELIST(output);
|
||||||
alpm_list_free(output);
|
|
||||||
output = NULL;
|
|
||||||
} else {
|
} else {
|
||||||
on_progress = 1;
|
on_progress = 1;
|
||||||
}
|
}
|
||||||
|
@ -133,8 +133,7 @@ int pacman_remove(alpm_list_t *targets)
|
|||||||
depstring);
|
depstring);
|
||||||
free(depstring);
|
free(depstring);
|
||||||
}
|
}
|
||||||
alpm_list_free_inner(data, free);
|
FREELIST(data);
|
||||||
alpm_list_free(data);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -717,8 +717,7 @@ static int sync_trans(alpm_list_t *targets, int sync_only)
|
|||||||
/* Step 4: release transaction resources */
|
/* Step 4: release transaction resources */
|
||||||
cleanup:
|
cleanup:
|
||||||
if(data) {
|
if(data) {
|
||||||
alpm_list_free_inner(data, free);
|
FREELIST(data);
|
||||||
alpm_list_free(data);
|
|
||||||
}
|
}
|
||||||
if(alpm_trans_release() == -1) {
|
if(alpm_trans_release() == -1) {
|
||||||
fprintf(stderr, _("error: failed to release transaction (%s)\n"),
|
fprintf(stderr, _("error: failed to release transaction (%s)\n"),
|
||||||
|
Loading…
Reference in New Issue
Block a user