summaryrefslogtreecommitdiffstats
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r--src/pacman/sync.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index f242c827..fa30b8da 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -443,7 +443,6 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets)
if(targets) {
for(i = targets; i; i = alpm_list_next(i)) {
- pmdb_t *db = NULL;
int foundpkg = 0;
char target[512]; /* TODO is this enough space? */
@@ -452,6 +451,7 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets)
strncpy(target, i->data, 512);
pkgstr = strchr(target, '/');
if(pkgstr) {
+ pmdb_t *db = NULL;
repo = target;
*pkgstr = '\0';
++pkgstr;
@@ -767,7 +767,6 @@ static int sync_trans(alpm_list_t *targets)
pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"),
alpm_strerror(err));
switch(err) {
- alpm_list_t *i;
case PM_ERR_PKG_INVALID_ARCH:
for(i = data; i; i = alpm_list_next(i)) {
char *pkg = alpm_list_getdata(i);
@@ -835,7 +834,6 @@ static int sync_trans(alpm_list_t *targets)
pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"),
alpm_strerror(err));
switch(err) {
- alpm_list_t *i;
case PM_ERR_FILE_CONFLICTS:
for(i = data; i; i = alpm_list_next(i)) {
pmfileconflict_t *conflict = alpm_list_getdata(i);