diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2016-12-09 17:14:06 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2017-01-04 04:59:15 +0100 |
commit | 6444ccbaf0c2ff566217eb32e32397868088812f (patch) | |
tree | 9405b1b579cab92b67a45a2399d6746cd948e8e8 /lib/libalpm/be_sync.c | |
parent | 585bd89803a37380f51d625115b58db4012f4df3 (diff) | |
download | pacman-6444ccbaf0c2ff566217eb32e32397868088812f.tar.gz pacman-6444ccbaf0c2ff566217eb32e32397868088812f.tar.xz |
add _alpm_filelist_sort
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_sync.c')
-rw-r--r-- | lib/libalpm/be_sync.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 12be2dd0..5f7d31ab 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -735,13 +735,12 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive, /* attempt to hand back any memory we don't need */ if(files_count > 0) { files = realloc(files, sizeof(alpm_file_t) * files_count); - /* make sure the list is sorted */ - qsort(files, files_count, sizeof(alpm_file_t), _alpm_files_cmp); } else { FREE(files); } pkg->files.count = files_count; pkg->files.files = files; + _alpm_filelist_sort(&pkg->files); } } if(ret != ARCHIVE_EOF) { |