[pacman-dev] [PATCH 1/5] Remove trans is NULL check in QUESTION/EVENT/PROGRESS macros
Dan McGee
dan at archlinux.org
Thu Aug 25 01:10:59 EDT 2011
trans cannot (and better not) be NULL at any point when these are being
called.
Signed-off-by: Dan McGee <dan at archlinux.org>
---
lib/libalpm/trans.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h
index 9a60e71..6d5c08d 100644
--- a/lib/libalpm/trans.h
+++ b/lib/libalpm/trans.h
@@ -49,19 +49,19 @@ struct __alpm_trans_t {
#define EVENT(t, e, d1, d2) \
do { \
- if((t) && (t)->cb_event) { \
+ if((t)->cb_event) { \
(t)->cb_event(e, d1, d2); \
} \
} while(0)
#define QUESTION(t, q, d1, d2, d3, r) \
do { \
- if((t) && (t)->cb_conv) { \
+ if((t)->cb_conv) { \
(t)->cb_conv(q, d1, d2, d3, r); \
} \
} while(0)
#define PROGRESS(t, e, p, per, h, r) \
do { \
- if((t) && (t)->cb_progress) { \
+ if((t)->cb_progress) { \
(t)->cb_progress(e, p, per, h, r); \
} \
} while(0)
--
1.7.6
More information about the pacman-dev
mailing list