1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-10 11:35:00 -05:00

changed alpm_db_register() prototype

This commit is contained in:
Aurelien Foret 2005-03-29 21:09:54 +00:00
parent d30333756a
commit c3f53cdf12
2 changed files with 4 additions and 2 deletions

View File

@ -167,7 +167,8 @@ int main(int argc, char *argv[])
} }
/* Opening local database */ /* Opening local database */
if(alpm_db_register("local", &db_local) == -1) { db_local = alpm_db_register("local");
if(db_local == NULL) {
ERR(NL, "could not register 'local' database (%s)\n", alpm_strerror(pm_errno)); ERR(NL, "could not register 'local' database (%s)\n", alpm_strerror(pm_errno));
cleanup(1); cleanup(1);
} }

View File

@ -390,7 +390,8 @@ int pacman_sync(list_t *targets)
/* open the database(s) */ /* open the database(s) */
for(i = pmc_syncs; i; i = i->next) { for(i = pmc_syncs; i; i = i->next) {
sync_t *sync = i->data; sync_t *sync = i->data;
if(alpm_db_register(sync->treename, &sync->db) == -1) { sync->db = alpm_db_register(sync->treename);
if(sync->db == NULL) {
ERR(NL, "%s\n", alpm_strerror(pm_errno)); ERR(NL, "%s\n", alpm_strerror(pm_errno));
return(1); return(1);
} }