Use do {} while(0) for c_kzg_free macro (#245)

This commit is contained in:
Justin Traglia 2023-03-24 10:42:08 -05:00 committed by GitHub
parent 9fbe75f392
commit 7695db3330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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