Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_local.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2020-04-13 22:24:23 +1000
committerAllan McRae <allan@archlinux.org>2020-04-13 23:44:46 +1000
commit6ba250e4001740ca428226abf157b25aa121c7bf (patch)
treeffed2284aad82174e784e01f1ded9af126880cf9 /lib/libalpm/be_local.c
parent0eda92c5d4f8810a68066ee72713ffdfa878dd8c (diff)
Use GOTO_ERR throughout
The GOTO_ERR define was added in commit 80ae8014 for use in future commits. There are plenty of places in the code base it can be used, so convert them. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r--lib/libalpm/be_local.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 689f0102..e73a97bb 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -256,8 +256,7 @@ static struct archive *_cache_mtree_open(alpm_pkg_t *pkg)
}
if((mtree = archive_read_new()) == NULL) {
- pkg->handle->pm_errno = ALPM_ERR_LIBARCHIVE;
- goto error;
+ GOTO_ERR(pkg->handle, ALPM_ERR_LIBARCHIVE, error);
}
_alpm_archive_read_support_filter_all(mtree);
@@ -266,9 +265,8 @@ static struct archive *_cache_mtree_open(alpm_pkg_t *pkg)
if((r = _alpm_archive_read_open_file(mtree, mtfile, ALPM_BUFFER_SIZE))) {
_alpm_log(pkg->handle, ALPM_LOG_ERROR, _("error while reading file %s: %s\n"),
mtfile, archive_error_string(mtree));
- pkg->handle->pm_errno = ALPM_ERR_LIBARCHIVE;
_alpm_archive_read_free(mtree);
- goto error;
+ GOTO_ERR(pkg->handle, ALPM_ERR_LIBARCHIVE, error);
}
free(mtfile);