index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2016-09-22 20:00:00 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2016-09-25 17:32:20 +1000 |
commit | 85171807c15fb5907d8337af2a50ab79392e1b8c (patch) | |
tree | 1459ab339a2fd46097b7405f7423f7d06356d3d8 /lib/libalpm | |
parent | 34f3f1e7a640488c4c32a3a825813afc1ad2ed68 (diff) |
-rw-r--r-- | lib/libalpm/be_local.c | 2 | ||||
-rw-r--r-- | lib/libalpm/be_sync.c | 5 |
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index 3ef1975e..43c6bc93 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -612,7 +612,7 @@ static int local_db_populate(alpm_db_t *db) _alpm_log(db->handle, ALPM_LOG_DEBUG, "added %zu packages to package cache for db '%s'\n", count, db->treename); - return count; + return 0; } /* Note: the return value must be freed by the caller */ 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 |