From 1e23b4585146b5c2bced10293c0f3486e53d51ed Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 26 Nov 2019 11:37:32 +1000 Subject: Fix documentation of alpm_mtree_next and remove libarchive exposure The documentation of the return types of alpm_mtree_next was incorrect. This extended into the relevant function in be_local.c. Also, return explicit integer values, rather than the ARCHIVE_xxx values, to avoid unnecessarily exposing frontends to libarchive internals (even though it makes no functional difference). Original-work-by: morganamilo Signed-off-by: Allan McRae --- src/pacman/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pacman/check.c b/src/pacman/check.c index ab35891a..85b25f39 100644 --- a/src/pacman/check.c +++ b/src/pacman/check.c @@ -277,7 +277,7 @@ int check_pkg_full(alpm_pkg_t *pkg) return 0; } - while(alpm_pkg_mtree_next(pkg, mtree, &entry) == ARCHIVE_OK) { + while(alpm_pkg_mtree_next(pkg, mtree, &entry) == 0) { struct stat st; const char *path = archive_entry_pathname(entry); char filepath[PATH_MAX]; -- cgit v1.2.3-24-g4f1b