index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2016-12-09 11:14:06 -0500 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2017-01-04 13:59:15 +1000 |
commit | 6444ccbaf0c2ff566217eb32e32397868088812f (patch) | |
tree | 9405b1b579cab92b67a45a2399d6746cd948e8e8 /lib/libalpm/filelist.c | |
parent | 585bd89803a37380f51d625115b58db4012f4df3 (diff) |
-rw-r--r-- | lib/libalpm/filelist.c | 8 |
diff --git a/lib/libalpm/filelist.c b/lib/libalpm/filelist.c index e360b1e9..46fb4b8d 100644 --- a/lib/libalpm/filelist.c +++ b/lib/libalpm/filelist.c @@ -111,7 +111,7 @@ alpm_list_t *_alpm_filelist_intersection(alpm_filelist_t *filesA, /* Helper function for comparing files list entries */ -int _alpm_files_cmp(const void *f1, const void *f2) +static int _alpm_files_cmp(const void *f1, const void *f2) { const alpm_file_t *file1 = f1; const alpm_file_t *file2 = f2; @@ -133,4 +133,10 @@ alpm_file_t SYMEXPORT *alpm_filelist_contains(alpm_filelist_t *filelist, sizeof(alpm_file_t), _alpm_files_cmp); } +void _alpm_filelist_sort(alpm_filelist_t *filelist) +{ + qsort(filelist->files, filelist->count, + sizeof(alpm_file_t), _alpm_files_cmp); +} + /* vim: set noet: */ |