Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-10-24 09:22:54 -0400
committerAllan McRae <allan@archlinux.org>2013-10-31 16:20:03 +1000
commitd5acf7a44a41c0ac8224895a9f15f3d04e80811d (patch)
tree8980ca4748a2d82abea50188ebdc4b722da81cab
parentc3493360afdc4e74558f1a8016cdb3164f9dbc8f (diff)
upgrade.c: use iterator variable
remote was being used to loop over itself, making the FREELIST ineffective. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--src/pacman/upgrade.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index 222f7fa6..5495ea9c 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -40,7 +40,7 @@
int pacman_upgrade(alpm_list_t *targets)
{
int retval = 0;
- alpm_list_t *i, *remote = NULL;
+ alpm_list_t *i, *j, *remote = NULL;
if(targets == NULL) {
pm_printf(ALPM_LOG_ERROR, _("no targets specified (use -h for help)\n"));
@@ -81,12 +81,12 @@ int pacman_upgrade(alpm_list_t *targets)
printf(_("loading packages...\n"));
/* add targets to the created transaction */
- for(i = targets; i; i = alpm_list_next(i), remote = alpm_list_next(remote)) {
+ for(i = targets, j = remote; i; i = alpm_list_next(i), j = alpm_list_next(j)) {
const char *targ = i->data;
alpm_pkg_t *pkg;
alpm_siglevel_t level;
- if(*(int *)remote->data) {
+ if(*(int *)j->data) {
level = alpm_option_get_remote_file_siglevel(config->handle);
} else {
level = alpm_option_get_local_file_siglevel(config->handle);