[glib] gio/tests/socket: fix one of the new tests
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio/tests/socket: fix one of the new tests
- Date: Sun, 14 Dec 2014 13:10:09 +0000 (UTC)
commit b6d1c66c506637ba614a2327e0071eb6a1873fc2
Author: Dan Winship <danw gnome org>
Date: Sun Dec 14 08:04:27 2014 -0500
gio/tests/socket: fix one of the new tests
One of the recently-added tests was using g_test_cmpstr() on a buffer
containing a string that wasn't necessarily 0-terminated.
gio/tests/socket.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/socket.c b/gio/tests/socket.c
index e376ecb..4c3f69b 100644
--- a/gio/tests/socket.c
+++ b/gio/tests/socket.c
@@ -491,6 +491,7 @@ test_ip_sync (GSocketFamily family)
g_assert_no_error (error);
g_assert_cmpint (len, ==, strlen (testbuf2));
+ memset (buf, 0, sizeof (buf));
len = g_socket_receive (client, buf, sizeof (buf), NULL, &error);
g_assert_no_error (error);
g_assert_cmpint (len, ==, strlen (testbuf2));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]