avtp: Initialise strack structures to 0 in tests
authorJan Schmidt <jan@centricular.com>
Thu, 28 May 2020 08:18:58 +0000 (18:18 +1000)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 28 May 2020 10:58:02 +0000 (10:58 +0000)
Avoid valgrind warnings about accessing uninitialised memory
in the tests by initialisting structures to 0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1305>

tests/check/elements/avtpcrfutil.c

index efecc8f..d2df4c4 100644 (file)
@@ -30,8 +30,8 @@
 
 GST_START_TEST (test_buffer_tstamp_valid)
 {
-  struct avtp_stream_pdu pdu;
-  GstMapInfo info;
+  struct avtp_stream_pdu pdu = { 0, };
+  GstMapInfo info = { 0, };
   gboolean result;
 
   info.data = (guint8 *) & pdu;