Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.h
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/alpm.h
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/alpm.h')
-rw-r--r--lib/libalpm/alpm.h3
1 files changed, 2 insertions, 1 deletions
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,