check/buffer: Remove usless memcmp with empty size

1) checking nothing against nothing is pointless
2) memcmp needs to be provided non-NULL arguments
This commit is contained in:
Edward Hervey 2017-11-24 12:08:07 +01:00 committed by Edward Hervey
parent 741ff6a371
commit 5429dcdf2e

View file

@ -69,8 +69,6 @@ GST_START_TEST (test_subbuffer)
fail_if (sub == NULL, "copy_region of buffer returned NULL");
fail_unless (gst_buffer_map (sub, &sinfo, GST_MAP_READ));
fail_unless (sinfo.size == 0, "subbuffer has wrong size");
fail_unless (memcmp (info.data + 1, sinfo.data, 0) == 0,
"subbuffer contains the wrong data");
ASSERT_BUFFER_REFCOUNT (sub, "subbuffer", 1);
gst_buffer_unmap (sub, &sinfo);
gst_buffer_unref (sub);