Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.h
diff options
context:
space:
mode:
authorRémy Oudompheng <remyoudompheng@gmail.com>2011-03-28 21:47:08 +0200
committerDan McGee <dan@archlinux.org>2011-03-29 12:10:08 -0500
commit287e8d356e8be8ae4af00e34e25d3f6727945952 (patch)
tree51163bd0a72821a7491ab9c9f54c1029fc6cfccc /lib/libalpm/util.h
parentb6ecb2329be53ad394a33e732ee923d85a278911 (diff)
alpm/handle.c: ensure handle is not NULL before proceeding
Many alpm_option_get/set_*() functions already check this and set pm_errno to the right value, but not all, so this improves consistency. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.h')
-rw-r--r--lib/libalpm/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index 3232f004..c66e9881 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -57,6 +57,10 @@
#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)
+#define RET_ERR_VOID(err) do { pm_errno = (err); \
+ _alpm_log(PM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerrorlast()); \
+ return; } while(0)
+
#define RET_ERR(err, ret) do { pm_errno = (err); \
_alpm_log(PM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerrorlast()); \
return(ret); } while(0)