dovecot-2.0: MODULE_CONTEXT() now avoids directly returning NULL...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Jun 12 02:35:36 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/aec2a41abe4a
changeset: 11529:aec2a41abe4a
user: Timo Sirainen <tss at iki.fi>
date: Sat Jun 12 00:35:32 2010 +0100
description:
MODULE_CONTEXT() now avoids directly returning NULL to make static analyzer happier.
diffstat:
src/lib/module-context.h | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (16 lines):
diff -r 0565807f7ca1 -r aec2a41abe4a src/lib/module-context.h
--- a/src/lib/module-context.h Sat Jun 12 00:26:22 2010 +0100
+++ b/src/lib/module-context.h Sat Jun 12 00:35:32 2010 +0100
@@ -46,10 +46,9 @@
COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(OBJ_REGISTER(obj), (id_ctx).reg)
#define MODULE_CONTEXT(obj, id_ctx) \
- (unlikely(!(id_ctx).id.module_id_set) ? NULL : \
(*((void **)array_idx_modifiable(&(obj)->module_contexts, \
- (id_ctx).id.module_id) + \
- OBJ_REGISTER_COMPATIBLE(obj, id_ctx))))
+ module_get_context_id(&(id_ctx).id)) + \
+ OBJ_REGISTER_COMPATIBLE(obj, id_ctx)))
#ifdef HAVE_TYPEOF
# define MODULE_CONTEXT_DEFINE(_name, _reg) \
More information about the dovecot-cvs
mailing list