index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2012-01-08 11:53:22 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-01-08 11:53:22 -0600 |
commit | 7f51ba99ae6db204d69ce271cd5cc4e959135738 (patch) | |
tree | e8e1739373b18cb17222238107fb7285dd50fdaa /lib/libalpm/be_sync.c | |
parent | 6f9ab22fd8c446eab58f1a6bbef7cb984575ef8a (diff) |
-rw-r--r-- | lib/libalpm/be_sync.c | 5 |
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index b16271bc..c4673b1b 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -391,7 +391,7 @@ static int sync_db_populate(alpm_db_t *db) { const char *dbpath; size_t est_count; - int count = -1, fd; + int count, fd; struct stat buf; struct archive *archive; struct archive_entry *entry; @@ -412,13 +412,14 @@ static int sync_db_populate(alpm_db_t *db) fd = _alpm_open_archive(db->handle, dbpath, &buf, &archive, ALPM_ERR_DB_OPEN); if(fd < 0) { - goto cleanup; + return -1; } est_count = estimate_package_count(&buf, archive); db->pkgcache = _alpm_pkghash_create(est_count); if(db->pkgcache == NULL) { db->handle->pm_errno = ALPM_ERR_MEMORY; + count = -1; goto cleanup; } |