[pacman-dev] [PATCH] alpm: fix documentation for alpm_mtree_next
End of archive is 1, not 0, also it is possible for errors to occur. Signed-off-by: morganamilo <morganamilo@archlinux.org> diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index d3630385..9c474443 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1328,7 +1328,7 @@ struct archive *alpm_pkg_mtree_open(alpm_pkg_t *pkg); * @param pkg the package that the mtree file is being read from * @param archive the archive structure reading from the mtree file * @param entry an archive_entry to store the entry header information - * @return 0 if end of archive is reached, non-zero otherwise. + * @return 1 if end of archive is reached, 0 on success, otherwise error */ int alpm_pkg_mtree_next(const alpm_pkg_t *pkg, struct archive *archive, struct archive_entry **entry); diff --git a/src/pacman/query.c b/src/pacman/query.c index bdcfc3c1..4e3ec5a0 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -194,7 +194,7 @@ static int query_fileowner(alpm_list_t *targets) if(strncmp(rpath, root, rootlen) != 0) { /* file is outside root, we know nothing can own it */ - pm_printf(ALPM_LOG_ERROR, _("No package owns %s\n"), filename); + pm_printf(ALPM_LOG_ERROR, _("No package owns %s\n"), rpath); goto targcleanup; } -- 2.24.0
End of archive is 1, not 0, also it is possible for errors to occur. Signed-off-by: morganamilo <morganamilo@archlinux.org> --- V2: fix stray changes. Working dir was not clean.... diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index d3630385..9c474443 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1328,7 +1328,7 @@ struct archive *alpm_pkg_mtree_open(alpm_pkg_t *pkg); * @param pkg the package that the mtree file is being read from * @param archive the archive structure reading from the mtree file * @param entry an archive_entry to store the entry header information - * @return 0 if end of archive is reached, non-zero otherwise. + * @return 1 if end of archive is reached, 0 on success, otherwise error */ int alpm_pkg_mtree_next(const alpm_pkg_t *pkg, struct archive *archive, struct archive_entry **entry); -- 2.24.0
participants (1)
-
morganamilo