caps: avoid doing logic in g_assert

Make sure we still do the right thing when glib is compiled without
assertions.
This commit is contained in:
Wim Taymans 2009-06-24 18:31:08 +02:00 committed by Wim Taymans
parent 3c87b8850f
commit 5602b935de

View file

@ -1379,7 +1379,8 @@ gst_caps_subtract (const GstCaps * minuend, const GstCaps * subtrahend)
You can only remove everything or nothing and that is done above.
Note: there's a test that checks this behaviour. */
g_return_val_if_fail (!gst_caps_is_any (minuend), NULL);
g_assert ((sublen = subtrahend->structs->len) > 0);
sublen = subtrahend->structs->len;
g_assert (sublen > 0);
src = gst_caps_copy (minuend);
for (i = 0; i < sublen; i++) {