Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/be_sync.c')
-rw-r--r--lib/libalpm/be_sync.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 06f96199..3591e3f8 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -464,6 +464,7 @@ static int sync_db_populate(alpm_db_t *db)
const char *dbpath;
size_t est_count;
int count, fd;
+ int ret = 0;
struct stat buf;
struct archive *archive;
struct archive_entry *entry;
@@ -497,7 +498,7 @@ static int sync_db_populate(alpm_db_t *db)
db->pkgcache = _alpm_pkghash_create(est_count);
if(db->pkgcache == NULL) {
db->handle->pm_errno = ALPM_ERR_MEMORY;
- count = -1;
+ ret = -1;
goto cleanup;
}
@@ -530,7 +531,7 @@ cleanup:
if(fd >= 0) {
close(fd);
}
- return count;
+ return ret;
}
/* This function validates %FILENAME%. filename must be between 3 and