[json-glib: 5/7] Apply 2 suggestion(s) to 1 file(s)
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib: 5/7] Apply 2 suggestion(s) to 1 file(s)
- Date: Sat, 9 Oct 2021 16:07:07 +0000 (UTC)
commit f65506080874b28eda37b622242b172258d9df76
Author: Emmanuele Bassi <ebassi gmail com>
Date: Sat Oct 9 15:45:34 2021 +0000
Apply 2 suggestion(s) to 1 file(s)
json-glib/json-node.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/json-glib/json-node.c b/json-glib/json-node.c
index e5c631e..57221c1 100644
--- a/json-glib/json-node.c
+++ b/json-glib/json-node.c
@@ -147,15 +147,11 @@ json_node_unset (JsonNode *node)
break;
case JSON_NODE_ARRAY:
- if (node->data.array)
- json_array_unref (node->data.array);
- node->data.array = NULL;
+ g_clear_pointer (&(node->data.array), json_array_unref);
break;
case JSON_NODE_VALUE:
- if (node->data.value)
- json_value_unref (node->data.value);
- node->data.value = NULL;
+ g_clear_pointer (&(node->data.value), json_value_unref);
break;
case JSON_NODE_NULL:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]