fix multi-statement marco asn1cCallocOne()

This commit is contained in:
Thomas Schlichter
2024-08-23 10:26:18 +02:00
parent 4039473a70
commit fc4310cda7
+4 -1
View File
@@ -216,7 +216,10 @@ static inline uint64_t BIT_STRING_to_uint64(const BIT_STRING_t *asn) {
#define asn1cSeqAdd(VaR, PtR) if (ASN_SEQUENCE_ADD(VaR,PtR)!=0) AssertFatal(false, "ASN.1 encoding error " #VaR "\n")
#define asn1cCallocOne(VaR, VaLue) \
VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue
do { \
VaR = calloc(1,sizeof(*VaR)); \
*VaR = VaLue; \
} while (0)
#define asn1cCalloc(VaR, lOcPtr) \
typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR))
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \