fix multi-statement marco asn1cCallocOne()
This commit is contained in:
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user