[json-glib] array: Ensure JsonArray is zero-initialised
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] array: Ensure JsonArray is zero-initialised
- Date: Thu, 28 Jan 2016 09:19:42 +0000 (UTC)
commit d8720da7ec351e5f15f6ce7baf96434ea42bb111
Author: Philip Withnall <philip withnall collabora co uk>
Date: Sat Nov 7 15:20:28 2015 +0100
array: Ensure JsonArray is zero-initialised
json-glib/json-array.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/json-glib/json-array.c b/json-glib/json-array.c
index ebc6d58..b8186e4 100644
--- a/json-glib/json-array.c
+++ b/json-glib/json-array.c
@@ -56,7 +56,7 @@ json_array_new (void)
{
JsonArray *array;
- array = g_slice_new (JsonArray);
+ array = g_slice_new0 (JsonArray);
array->ref_count = 1;
array->elements = g_ptr_array_new ();
@@ -77,7 +77,7 @@ json_array_sized_new (guint n_elements)
{
JsonArray *array;
- array = g_slice_new (JsonArray);
+ array = g_slice_new0 (JsonArray);
array->ref_count = 1;
array->elements = g_ptr_array_sized_new (n_elements);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]