mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
code cleanup
This commit is contained in:
parent
54f6a1cb12
commit
f3975acf90
@ -213,8 +213,8 @@ int alpm_db_unregister(pmdb_t *db)
|
|||||||
handle->db_local = NULL;
|
handle->db_local = NULL;
|
||||||
found = 1;
|
found = 1;
|
||||||
} else {
|
} else {
|
||||||
void *data;
|
pmdb_t *data;
|
||||||
handle->dbs_sync = _alpm_list_remove(handle->dbs_sync, db, db_cmp, &data);
|
handle->dbs_sync = _alpm_list_remove(handle->dbs_sync, db, db_cmp, (void **)&data);
|
||||||
if(data) {
|
if(data) {
|
||||||
db_close(data);
|
db_close(data);
|
||||||
found = 1;
|
found = 1;
|
||||||
|
@ -238,7 +238,7 @@ int remove_commit(pmtrans_t *trans, pmdb_t *db)
|
|||||||
for(lp = info->depends; lp; lp = lp->next) {
|
for(lp = info->depends; lp; lp = lp->next) {
|
||||||
pmpkg_t *depinfo = NULL;
|
pmpkg_t *depinfo = NULL;
|
||||||
pmdepend_t depend;
|
pmdepend_t depend;
|
||||||
void *ptr;
|
char *data;
|
||||||
|
|
||||||
if(splitdep((char*)lp->data, &depend)) {
|
if(splitdep((char*)lp->data, &depend)) {
|
||||||
continue;
|
continue;
|
||||||
@ -264,8 +264,8 @@ int remove_commit(pmtrans_t *trans, pmdb_t *db)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* splice out this entry from requiredby */
|
/* splice out this entry from requiredby */
|
||||||
depinfo->requiredby = _alpm_list_remove(depinfo->requiredby, info->name, str_cmp, &ptr);
|
depinfo->requiredby = _alpm_list_remove(depinfo->requiredby, info->name, str_cmp, (void **)&data);
|
||||||
FREE(ptr);
|
FREE(data);
|
||||||
_alpm_log(PM_LOG_DEBUG, "updating 'requiredby' field for package %s", depinfo->name);
|
_alpm_log(PM_LOG_DEBUG, "updating 'requiredby' field for package %s", depinfo->name);
|
||||||
if(db_write(db, depinfo, INFRQ_DEPENDS)) {
|
if(db_write(db, depinfo, INFRQ_DEPENDS)) {
|
||||||
_alpm_log(PM_LOG_ERROR, "could not update 'requiredby' database entry %s/%s-%s", db->treename, depinfo->name, depinfo->version);
|
_alpm_log(PM_LOG_ERROR, "could not update 'requiredby' database entry %s/%s-%s", db->treename, depinfo->name, depinfo->version);
|
||||||
|
Loading…
Reference in New Issue
Block a user