From 16dce195c167b607fa68739b4e0844849a1192b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Mon, 9 Feb 2015 20:34:59 +0100
Subject: [PATCH] Cleaner up the previous commit
---
sensei-raw-ctl-gui.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/sensei-raw-ctl-gui.c b/sensei-raw-ctl-gui.c
index 3a7de24..aa22b13 100644
--- a/sensei-raw-ctl-gui.c
+++ b/sensei-raw-ctl-gui.c
@@ -30,15 +30,8 @@
#include "config.h"
#if ! GLIB_CHECK_VERSION (2, 34, 0)
-static void
-g_clear_pointer (void **pointer, void (*destroy) (void *))
-{
- if (*pointer)
- {
- destroy (*pointer);
- *pointer = NULL;
- }
-}
+#define g_clear_pointer(p, destroy) \
+ G_STMT_START if (*(p)) { (destroy) (*(p)); *(p) = NULL; } G_STMT_END
#endif // ! GLIB_CHECK_VERSION (2, 34)
/** User interface string for GtkBuilder. */