mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 23:38:49 -05:00
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>
This commit is contained in:
parent
85171807c1
commit
6a5156eedc
@ -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)
|
static int sync_db_populate(alpm_db_t *db)
|
||||||
{
|
{
|
||||||
const char *dbpath;
|
const char *dbpath;
|
||||||
size_t est_count;
|
size_t est_count, count;
|
||||||
int count, fd;
|
int fd;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
struct archive *archive;
|
struct archive *archive;
|
||||||
@ -520,10 +520,10 @@ static int sync_db_populate(alpm_db_t *db)
|
|||||||
count = alpm_list_count(db->pkgcache->list);
|
count = alpm_list_count(db->pkgcache->list);
|
||||||
if(count > 0) {
|
if(count > 0) {
|
||||||
db->pkgcache->list = alpm_list_msort(db->pkgcache->list,
|
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,
|
_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);
|
count, db->treename);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
Reference in New Issue
Block a user