Use do {} while(0) for c_kzg_free macro (#245)
This commit is contained in:
parent
9fbe75f392
commit
7695db3330
|
@ -39,10 +39,10 @@
|
|||
* c_kzg_free() macro sets the pointer value to NULL after freeing it.
|
||||
*/
|
||||
#define c_kzg_free(p) \
|
||||
(void)({ \
|
||||
do { \
|
||||
free(p); \
|
||||
(p) = NULL; \
|
||||
})
|
||||
} while (0)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Types
|
||||
|
|
Loading…
Reference in New Issue