From 3d17cdceffee90e3af0bede90c82e90f2d761969 Mon Sep 17 00:00:00 2001 From: scottmk Date: Sun, 11 Jan 2009 22:11:34 +0000 Subject: [PATCH] In the macro OSRF_LIST_GET_INDEX: placed all occurrences of the macro arguments in parentheses, to prevent unexpected effects when one or more of the arguments is an expression. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1616 9efc2488-bf62-4759-914b-345cdb29e865 --- include/opensrf/osrf_list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/opensrf/osrf_list.h b/include/opensrf/osrf_list.h index 35ec116..aeaf357 100644 --- a/include/opensrf/osrf_list.h +++ b/include/opensrf/osrf_list.h @@ -7,7 +7,7 @@ extern "C" { #endif -#define OSRF_LIST_GET_INDEX(l, i) (!l || i >= l->size) ? NULL: l->arrlist[i] +#define OSRF_LIST_GET_INDEX(l, i) (!(l) || (i) >= (l)->size) ? NULL: (l)->arrlist[(i)] /** Items are stored as void*'s so it's up to the user to -- 2.43.2