From a55adb81d0f6fcd7fe98cc444806b3b0d25efc9c Mon Sep 17 00:00:00 2001 From: Ivy Foster Date: Wed, 12 Oct 2016 15:13:31 -0500 Subject: 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 Signed-off-by: Allan McRae --- lib/libalpm/be_package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/be_package.c') diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index 430d2aeb..befcba31 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -274,7 +274,7 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle, alpm_siglist_t **sigdata, alpm_pkgvalidation_t *validation) { int has_sig; - handle->pm_errno = 0; + handle->pm_errno = ALPM_ERR_OK; if(pkgfile == NULL || strlen(pkgfile) == 0) { RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1); -- cgit v1.2.3-24-g4f1b