]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
utils: Define ignore_result() so it requires a semicolon
authorTobias Brunner <tobias@strongswan.org>
Thu, 29 Feb 2024 15:02:28 +0000 (16:02 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 29 Feb 2024 15:02:28 +0000 (16:02 +0100)
It previously also added its own empty statement.

src/libstrongswan/utils/utils.h

index 40fe76af8be0f20470595035659c74121ee322f9..42d01144a2f61c6c1580607cd5b0796f31ccc785 100644 (file)
@@ -217,7 +217,7 @@ void utils_deinit();
 /**
  * Ignore result of functions tagged with warn_unused_result attributes
  */
-#define ignore_result(call) { if(call){}; }
+#define ignore_result(call) do { if(call){} } while(0)
 
 #if !defined(HAVE_SIGWAITINFO) && !defined(WIN32)
 /**