From: Tobias Brunner Date: Wed, 28 Feb 2024 13:40:56 +0000 (+0100) Subject: utils: Define DESTROY_*_IF() macros without terminating semicolon X-Git-Tag: 5.9.14dr2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a380dc498904ff367a71cf2dc822b13f59b6cd3a;p=thirdparty%2Fstrongswan.git utils: Define DESTROY_*_IF() macros without terminating semicolon This avoids double semicolons (i.e. empty statements) and is how DESTROY_IF() is already defined. --- diff --git a/src/libstrongswan/utils/utils/object.h b/src/libstrongswan/utils/utils/object.h index 6ace60041d..fb9a2428f8 100644 --- a/src/libstrongswan/utils/utils/object.h +++ b/src/libstrongswan/utils/utils/object.h @@ -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.