[glib] Clear the buffer initially
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Clear the buffer initially
- Date: Wed, 7 Jul 2010 05:19:08 +0000 (UTC)
commit bad9a3718e84549de23b56eed980f97a0b9c8b7e
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 7 01:00:58 2010 -0400
Clear the buffer initially
gio/tests/converter-stream.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/tests/converter-stream.c b/gio/tests/converter-stream.c
index 3492db8..63f9e70 100644
--- a/gio/tests/converter-stream.c
+++ b/gio/tests/converter-stream.c
@@ -653,7 +653,7 @@ test_charset (gconstpointer data)
in2 = g_converter_input_stream_new (in, conv);
count = 2 * strlen (test->text_out);
- buffer = g_malloc (count);
+ buffer = g_malloc0 (count);
error = NULL;
g_input_stream_read_all (in2, buffer, count, &bytes_read, NULL, &error);
if (test->n_fallbacks == 0)
@@ -681,7 +681,7 @@ test_charset (gconstpointer data)
in2 = g_converter_input_stream_new (in, conv);
count = 2 * strlen (test->text_out);
- buffer = g_malloc (count);
+ buffer = g_malloc0 (count);
error = NULL;
g_input_stream_read_all (in2, buffer, count, &bytes_read, NULL, &error);
g_assert_no_error (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]