]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
utils: Define DESTROY_*_IF() macros without terminating semicolon
authorTobias Brunner <tobias@strongswan.org>
Wed, 28 Feb 2024 13:40:56 +0000 (14:40 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 29 Feb 2024 08:06:43 +0000 (09:06 +0100)
This avoids double semicolons (i.e. empty statements) and is how
DESTROY_IF() is already defined.

src/libstrongswan/utils/utils/object.h

index 6ace60041df986a1360b2a79f7d94a942228e92f..fb9a2428f8ea86c323bcad2a12177b4e7e238c18 100644 (file)
 /**
  * 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.