From: Leandro Lucarella Date: Tue, 16 Sep 2008 13:17:35 +0000 (-0300) Subject: Avoid valgrind error about send()ing uninitialized data X-Git-Url: https://git.llucax.com/software/posixx.git/commitdiff_plain/e666e9717b5047d9dcaaae823afbab4e372b0b6f Avoid valgrind error about send()ing uninitialized data --- diff --git a/test/socket/generic_test.hpp b/test/socket/generic_test.hpp index 4e87780..a5716f6 100644 --- a/test/socket/generic_test.hpp +++ b/test/socket/generic_test.hpp @@ -233,6 +233,7 @@ BOOST_AUTO_TEST_CASE( dgram_sendto_recvfrom_struct_test ) s2.bind(test_address2); // socket 1 send data d; + memset(&d, 0, sizeof(data)); strcpy(d.msg, "hello world!"); d.number = -32495813; s1.send_struct(d, test_address2);