From d83adffd2db0b6683e6bf4cdf3d12ae8c5be954a Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 2 Jul 2020 12:29:59 +0100 Subject: [PATCH] libsysprof-capture: Avoid using G_STMT_{START,END} from GLib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Open-code them instead, as they’re relatively simple. Signed-off-by: Philip Withnall Helps: #40 --- src/libsysprof-capture/sysprof-collector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsysprof-capture/sysprof-collector.c b/src/libsysprof-capture/sysprof-collector.c index d36b7f47..0175073a 100644 --- a/src/libsysprof-capture/sysprof-collector.c +++ b/src/libsysprof-capture/sysprof-collector.c @@ -281,7 +281,7 @@ sysprof_collector_init (void) } #define COLLECTOR_BEGIN \ - G_STMT_START { \ + do { \ const SysprofCollector *collector = sysprof_collector_get (); \ if SYSPROF_LIKELY (collector->buffer) \ { \ @@ -296,7 +296,7 @@ sysprof_collector_init (void) if SYSPROF_UNLIKELY (collector->is_shared) \ G_UNLOCK (control_fd); \ } \ - } G_STMT_END + } while (0) void sysprof_collector_allocate (SysprofCaptureAddress alloc_addr,