[retro-gtk/gtk-cleanup: 7/10] core: Use autocleanups
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/gtk-cleanup: 7/10] core: Use autocleanups
- Date: Sun, 24 May 2020 12:40:13 +0000 (UTC)
commit 961584652ee4f257ebe1b5c4da1d4af7114c7ec9
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun May 24 14:35:18 2020 +0200
core: Use autocleanups
This makes the code safer and more concise.
retro-gtk/retro-core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index fe508b2..695dac2 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -993,15 +993,13 @@ variables_set_cb (IpcRunner *runner,
GVariant *data,
RetroCore *self)
{
- GVariantIter *iter;
+ g_autoptr (GVariantIter) iter = NULL;
gchar *key, *value;
g_variant_get (data, "a(ss)", &iter);
while (g_variant_iter_loop (iter, "(ss)", &key, &value))
insert_variable (self, key, value);
-
- g_variant_iter_free (iter);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]