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:
authorDan McGee <dan@archlinux.org>2011-04-20 19:00:59 -0500
committerDan McGee <dan@archlinux.org>2011-04-20 19:00:59 -0500
commita6c05458d44afa27d0b8771e86bdb57facf66071 (patch)
tree2398afa74f92d45eb7aa6de1167c98ba456e96e7 /lib/libalpm/sync.c
parent4c31bc6e3f32d954a9a0f81555abe5b91db3a6d3 (diff)
Put comments on their own line
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 5428e40b..9f906d39 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -117,7 +117,8 @@ int SYMEXPORT alpm_sync_sysupgrade(int enable_downgrade)
pmdb_t *sdb = j->data;
/* Check sdb */
pmpkg_t *spkg = _alpm_db_get_pkgfromcache(sdb, lpkg->name);
- if(spkg) { /* 1. literal was found in sdb */
+ if(spkg) {
+ /* 1. literal was found in sdb */
int cmp = _alpm_pkg_compare_versions(spkg, lpkg);
if(cmp > 0) {
_alpm_log(PM_LOG_DEBUG, "new version of '%s' found (%s => %s)\n",
@@ -147,8 +148,10 @@ int SYMEXPORT alpm_sync_sysupgrade(int enable_downgrade)
lpkg->name, lpkg->version, sdb->treename, spkg->version);
}
}
- break; /* jump to next local package */
- } else { /* 2. search for replacers in sdb */
+ /* jump to next local package */
+ break;
+ } else {
+ /* 2. search for replacers in sdb */
int found = 0;
for(k = _alpm_db_get_pkgcache(sdb); k; k = k->next) {
spkg = k->data;
@@ -184,7 +187,8 @@ int SYMEXPORT alpm_sync_sysupgrade(int enable_downgrade)
if(alpm_pkg_get_reason(lpkg) == PM_PKG_REASON_EXPLICIT) {
tpkg->reason = PM_PKG_REASON_EXPLICIT;
}
- } else { /* add spkg to the target list */
+ } else {
+ /* add spkg to the target list */
/* copy over reason */
spkg->reason = alpm_pkg_get_reason(lpkg);
spkg->removes = alpm_list_add(NULL, lpkg);