From c3f53cdf1275b4572338bb822334d0622df9ad29 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Tue, 29 Mar 2005 21:09:54 +0000 Subject: changed alpm_db_register() prototype --- src/pacman/pacman.c | 3 ++- src/pacman/sync.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 730d9207..7f13f39e 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -167,7 +167,8 @@ int main(int argc, char *argv[]) } /* 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)); cleanup(1); } diff --git a/src/pacman/sync.c b/src/pacman/sync.c index f16c3656..01a535cb 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -390,7 +390,8 @@ int pacman_sync(list_t *targets) /* open the database(s) */ for(i = pmc_syncs; i; i = i->next) { 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)); return(1); } -- cgit v1.2.3-24-g4f1b