From 4179c600944f016faba791d1e68bdc65e92d31a4 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sun, 26 Jan 2003 18:06:59 +0000 Subject: [PATCH] Protection of value in macro. --- include/gedcom.h.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/gedcom.h.in b/include/gedcom.h.in index 8129975..6219def 100644 --- a/include/gedcom.h.in +++ b/include/gedcom.h.in @@ -435,12 +435,12 @@ extern struct age_value def_age_val; extern struct xref_value def_xref_val; #define GV_CHECK_CAST(VAL, TYPE, MEMBER, DEFVAL) \ - ((VAL->type == TYPE) ? \ - VAL->value.MEMBER : \ - (gedcom_cast_error(__FILE__,__LINE__, TYPE, VAL->type), DEFVAL)) + (((VAL)->type == TYPE) ? \ + (VAL)->value.MEMBER : \ + (gedcom_cast_error(__FILE__,__LINE__, TYPE, (VAL)->type), DEFVAL)) #define GV_IS_TYPE(VAL, TYPE) \ - (VAL->type == TYPE) + ((VAL)->type == TYPE) /**************************************************************************/ /*** Function interface ***/ -- 2.30.2