From: Stefan Sauer Date: Sun, 27 Dec 2015 18:42:37 +0000 (+0100) Subject: check: don't memcmp twice X-Git-Tag: 1.10.4~554 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6e72aa28f6dc48f484a7095731e39e002f4dd78;p=platform%2Fupstream%2Fgstreamer.git check: don't memcmp twice Simply call fail() in the condition after the first memcmp. --- diff --git a/libs/gst/check/gstcheck.c b/libs/gst/check/gstcheck.c index 1022214..a5e3e06 100644 --- a/libs/gst/check/gstcheck.c +++ b/libs/gst/check/gstcheck.c @@ -421,7 +421,7 @@ gst_check_setup_sink_pad (GstElement * element, GstStaticPadTemplate * tmpl) * @tmpl: pad template * @name: Name of the @element src pad that will be linked to the sink pad that will be setup * - * Creates a new sink pad (based on the given @tmpl) and links it to the given @element src pad + * Creates a new sink pad (based on the given @tmpl) and links it to the given @element src pad * (the pad that matches the given @name). * You can set event/chain/query functions on this pad to check the output of the @element. * @@ -559,9 +559,8 @@ gst_check_buffer_data (GstBuffer * buffer, gconstpointer data, gsize size) gst_util_dump_mem (info.data, info.size); g_print ("\nExpected data:\n"); gst_util_dump_mem (data, size); + fail ("buffer contents not equal"); } - fail_unless (memcmp (info.data, data, size) == 0, - "buffer contents not equal"); gst_buffer_unmap (buffer, &info); }