utils: Define DESTROY_*_IF() macros without terminating semicolon

This avoids double semicolons (i.e. empty statements) and is how
DESTROY_IF() is already defined.
This commit is contained in:
Tobias Brunner 2024-02-28 14:40:56 +01:00
parent b21178b43c
commit a380dc4989

View File

@ -31,12 +31,12 @@
/**
* Call offset destructor of an object, if object != NULL
*/
#define DESTROY_OFFSET_IF(obj, offset) if (obj) obj->destroy_offset(obj, offset);
#define DESTROY_OFFSET_IF(obj, offset) if (obj) obj->destroy_offset(obj, offset)
/**
* Call function destructor of an object, if object != NULL
*/
#define DESTROY_FUNCTION_IF(obj, fn) if (obj) obj->destroy_function(obj, fn);
#define DESTROY_FUNCTION_IF(obj, fn) if (obj) obj->destroy_function(obj, fn)
/**
* Object allocation/initialization macro, using designated initializer.