diff options
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r-- | src/pacman/sync.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |