index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2016-09-22 20:00:00 +0200 |
---|---|---|
committer | Andrew Gregory <andrew.gregory.8@gmail.com> | 2017-05-08 23:27:43 -0400 |
commit | 7cc50125498ad33f78871be282fb75e41f6e8a77 (patch) | |
tree | 8224dddad991812c28d92e7442cf782d6f03b0a5 /lib/libalpm/be_sync.c | |
parent | 22cadea56aa4a991db5c97bc81b7ed60702269aa (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 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 |