Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-02-13 18:54:28 -0500
committerAllan McRae <allan@archlinux.org>2013-02-16 11:06:43 +1000
commitd5a5a6b512f20cf0b6f72e58ca0479af69044359 (patch)
treea7d7f7bba150b8374ea54d9c45d1154c41949846 /lib/libalpm/sync.c
parent578dfcd9779e5fdcf5b3a32b97c9b31728cc9c20 (diff)
fix style violations
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index be55500c..f7b956ca 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -539,10 +539,11 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
for(i = deps; i; i = i->next) {
alpm_conflict_t *conflict = i->data;
+ int doremove = 0;
+ int found = 0;
/* if conflict->package2 (the local package) is not elected for removal,
we ask the user */
- int found = 0;
for(j = trans->add; j && !found; j = j->next) {
alpm_pkg_t *spkg = j->data;
if(alpm_pkg_find(spkg->removes, conflict->package2)) {
@@ -556,13 +557,12 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
_alpm_log(handle, ALPM_LOG_DEBUG, "package '%s' conflicts with '%s'\n",
conflict->package1, conflict->package2);
- alpm_pkg_t *sync = alpm_pkg_find(trans->add, conflict->package1);
- alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2);
- int doremove = 0;
QUESTION(handle, ALPM_QUESTION_CONFLICT_PKG, conflict->package1,
conflict->package2, conflict->reason->name, &doremove);
if(doremove) {
/* append to the removes list */
+ alpm_pkg_t *sync = alpm_pkg_find(trans->add, conflict->package1);
+ alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2);
_alpm_log(handle, ALPM_LOG_DEBUG, "electing '%s' for removal\n", conflict->package2);
sync->removes = alpm_list_add(sync->removes, local);
} else { /* abort */