Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/signing.c
diff options
context:
space:
mode:
authorIvy Foster <ivy.foster@gmail.com>2016-10-12 15:13:31 -0500
committerAllan McRae <allan@archlinux.org>2016-10-22 20:50:55 +1000
commita55adb81d0f6fcd7fe98cc444806b3b0d25efc9c (patch)
tree8bf6a8b9f048a9b1073d964ffcead9015f404bd0 /lib/libalpm/signing.c
parenta79be86f5751b4341f1339a32a5a8737439ac28d (diff)
Add ALPM_ERR_OK to _alpm_errno_t
This allows functions which return an _alpm_errno_t to always return a genuine _alpm_errno_t for consistency, even in cases where there are no errors. Since ALPM_ERR_OK = 0, their callers can still simply check 'err = some_fn(); if (!err) { ... }'. Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/signing.c')
-rw-r--r--lib/libalpm/signing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index 6557c200..527e763f 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -771,7 +771,7 @@ int _alpm_check_pgp_helper(alpm_handle_t *handle, const char *path,
if(ret && handle->pm_errno == ALPM_ERR_SIG_MISSING) {
if(optional) {
_alpm_log(handle, ALPM_LOG_DEBUG, "missing optional signature\n");
- handle->pm_errno = 0;
+ handle->pm_errno = ALPM_ERR_OK;
ret = 0;
} else {
_alpm_log(handle, ALPM_LOG_DEBUG, "missing required signature\n");
@@ -931,7 +931,7 @@ int SYMEXPORT alpm_pkg_check_pgp_signature(alpm_pkg_t *pkg,
{
ASSERT(pkg != NULL, return -1);
ASSERT(siglist != NULL, RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
- pkg->handle->pm_errno = 0;
+ pkg->handle->pm_errno = ALPM_ERR_OK;
return _alpm_gpgme_checksig(pkg->handle, pkg->filename,
pkg->base64_sig, siglist);
@@ -948,7 +948,7 @@ int SYMEXPORT alpm_db_check_pgp_signature(alpm_db_t *db,
{
ASSERT(db != NULL, return -1);
ASSERT(siglist != NULL, RET_ERR(db->handle, ALPM_ERR_WRONG_ARGS, -1));
- db->handle->pm_errno = 0;
+ db->handle->pm_errno = ALPM_ERR_OK;
return _alpm_gpgme_checksig(db->handle, _alpm_db_path(db), NULL, siglist);
}