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/alpm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 7955585a..0f8274bb 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -53,7 +53,8 @@ typedef struct __alpm_trans_t alpm_trans_t; * @{ */ typedef enum _alpm_errno_t { - ALPM_ERR_MEMORY = 1, + ALPM_ERR_OK = 0, + ALPM_ERR_MEMORY, ALPM_ERR_SYSTEM, ALPM_ERR_BADPERMS, ALPM_ERR_NOT_A_FILE, -- cgit v1.2.3-24-g4f1b