From: Peter Verthez Date: Sun, 26 Jan 2003 18:06:59 +0000 (+0000) Subject: Protection of value in macro. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=4179c600944f016faba791d1e68bdc65e92d31a4;p=gedcom-parse.git Protection of value in macro. --- 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 ***/