diff --git a/common/utils/oai_asn1.h b/common/utils/oai_asn1.h index 573fa94d75..600aea1392 100644 --- a/common/utils/oai_asn1.h +++ b/common/utils/oai_asn1.h @@ -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) \