libalpm/sync: remove useless intermediate variable
This also rearranges some code to ensure that declarations and code aren't mixed. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
d90641a894
commit
08a1244f4e
1 changed files with 2 additions and 5 deletions
|
@ -212,9 +212,8 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
|
||||||
/* Search for replacers then literal (if no replacer) in each sync database. */
|
/* Search for replacers then literal (if no replacer) in each sync database. */
|
||||||
for(j = handle->dbs_sync; j; j = j->next) {
|
for(j = handle->dbs_sync; j; j = j->next) {
|
||||||
alpm_db_t *sdb = j->data;
|
alpm_db_t *sdb = j->data;
|
||||||
|
alpm_list_t *replacers = check_replacers(handle, lpkg, sdb);
|
||||||
/* Check sdb */
|
/* Check sdb */
|
||||||
alpm_list_t *replacers;
|
|
||||||
replacers = check_replacers(handle, lpkg, sdb);
|
|
||||||
if(replacers) {
|
if(replacers) {
|
||||||
trans->add = alpm_list_join(trans->add, replacers);
|
trans->add = alpm_list_join(trans->add, replacers);
|
||||||
/* jump to next local package */
|
/* jump to next local package */
|
||||||
|
@ -222,9 +221,7 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
|
||||||
} else {
|
} else {
|
||||||
alpm_pkg_t *spkg = _alpm_db_get_pkgfromcache(sdb, lpkg->name);
|
alpm_pkg_t *spkg = _alpm_db_get_pkgfromcache(sdb, lpkg->name);
|
||||||
if(spkg) {
|
if(spkg) {
|
||||||
int literal_upgrade = 0;
|
if(check_literal(handle, lpkg, spkg, enable_downgrade)) {
|
||||||
literal_upgrade = check_literal(handle, lpkg, spkg, enable_downgrade);
|
|
||||||
if(literal_upgrade) {
|
|
||||||
trans->add = alpm_list_add(trans->add, spkg);
|
trans->add = alpm_list_add(trans->add, spkg);
|
||||||
}
|
}
|
||||||
/* jump to next local package */
|
/* jump to next local package */
|
||||||
|
|
Loading…
Add table
Reference in a new issue