Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.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/sync.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/sync.c')
-rw-r--r--lib/libalpm/sync.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 50b21b54..8a9dcae8 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -456,11 +456,10 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
}
} else {
/* pm_errno was set by resolvedeps, callback may have overwrote it */
- handle->pm_errno = ALPM_ERR_UNSATISFIED_DEPS;
alpm_list_free(resolved);
alpm_list_free(unresolvable);
ret = -1;
- goto cleanup;
+ GOTO_ERR(handle, ALPM_ERR_UNSATISFIED_DEPS, cleanup);
}
}
@@ -820,7 +819,7 @@ static int download_files(alpm_handle_t *handle)
const alpm_pkg_t *pkg = i->data;
struct dload_payload payload = {0};
- STRDUP(payload.remote_name, pkg->filename, handle->pm_errno = ALPM_ERR_MEMORY; goto finish);
+ STRDUP(payload.remote_name, pkg->filename, GOTO_ERR(handle, ALPM_ERR_MEMORY, finish));
payload.servers = pkg->origin_data.db->servers;
payload.max_size = pkg->size;