summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2016-09-22 20:00:01 +0200
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-05-09 05:27:43 +0200
commitf6ccb46dc985d6d4f65783c2158a60153c3c6b76 (patch)
tree4f0f11eea174461cd75329ba6371cc2077c07b52
parent7cc50125498ad33f78871be282fb75e41f6e8a77 (diff)
downloadpacman-f6ccb46dc985d6d4f65783c2158a60153c3c6b76.tar.gz
pacman-f6ccb46dc985d6d4f65783c2158a60153c3c6b76.tar.xz
Change type of count in be_sync
Making it size_t matches the return value of alpm_list_count() and avoids the implicit cast to int. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 6a5156eedc378057eb2ced2c6e6191c50286b1e1)
-rw-r--r--lib/libalpm/be_sync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 3591e3f8..a8362778 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -462,8 +462,8 @@ static size_t estimate_package_count(struct stat *st, struct archive *archive)
static int sync_db_populate(alpm_db_t *db)
{
const char *dbpath;
- size_t est_count;
- int count, fd;
+ size_t est_count, count;
+ int fd;
int ret = 0;
struct stat buf;
struct archive *archive;
@@ -520,10 +520,10 @@ static int sync_db_populate(alpm_db_t *db)
count = alpm_list_count(db->pkgcache->list);
if(count > 0) {
db->pkgcache->list = alpm_list_msort(db->pkgcache->list,
- (size_t)count, _alpm_pkg_cmp);
+ count, _alpm_pkg_cmp);
}
_alpm_log(db->handle, ALPM_LOG_DEBUG,
- "added %d packages to package cache for db '%s'\n",
+ "added %zu packages to package cache for db '%s'\n",
count, db->treename);
cleanup: