mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 20:35:49 +01:00
Clear the buffer initially
This commit is contained in:
parent
46a80b38c3
commit
bad9a3718e
@ -653,7 +653,7 @@ test_charset (gconstpointer data)
|
|||||||
in2 = g_converter_input_stream_new (in, conv);
|
in2 = g_converter_input_stream_new (in, conv);
|
||||||
|
|
||||||
count = 2 * strlen (test->text_out);
|
count = 2 * strlen (test->text_out);
|
||||||
buffer = g_malloc (count);
|
buffer = g_malloc0 (count);
|
||||||
error = NULL;
|
error = NULL;
|
||||||
g_input_stream_read_all (in2, buffer, count, &bytes_read, NULL, &error);
|
g_input_stream_read_all (in2, buffer, count, &bytes_read, NULL, &error);
|
||||||
if (test->n_fallbacks == 0)
|
if (test->n_fallbacks == 0)
|
||||||
@ -681,7 +681,7 @@ test_charset (gconstpointer data)
|
|||||||
in2 = g_converter_input_stream_new (in, conv);
|
in2 = g_converter_input_stream_new (in, conv);
|
||||||
|
|
||||||
count = 2 * strlen (test->text_out);
|
count = 2 * strlen (test->text_out);
|
||||||
buffer = g_malloc (count);
|
buffer = g_malloc0 (count);
|
||||||
error = NULL;
|
error = NULL;
|
||||||
g_input_stream_read_all (in2, buffer, count, &bytes_read, NULL, &error);
|
g_input_stream_read_all (in2, buffer, count, &bytes_read, NULL, &error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user