summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index e65db498..1f20989d 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -92,8 +92,7 @@ static size_t _package_changelog_read(void *ptr, size_t size,
ssize_t sret = archive_read_data((struct archive *)fp, ptr, size);
/* Report error (negative values) */
if(sret < 0) {
- pkg->handle->pm_errno = PM_ERR_LIBARCHIVE;
- return 0;
+ RET_ERR(pkg->handle, PM_ERR_LIBARCHIVE, 0);
} else {
return (size_t)sret;
}