From: Thomas Vander Stichele Date: Thu, 11 May 2006 21:04:08 +0000 (+0000) Subject: macros show the correct line X-Git-Tag: 1.19.3~511^2~11916 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9402c76bf47693715b4a54763d1b6d854be61e94;p=platform%2Fupstream%2Fgstreamer.git macros show the correct line Original commit message from CVS: macros show the correct line --- diff --git a/tests/check/elements/multifdsink.c b/tests/check/elements/multifdsink.c index 99717ce07a..22a77ee970 100644 --- a/tests/check/elements/multifdsink.c +++ b/tests/check/elements/multifdsink.c @@ -65,17 +65,15 @@ wait_bytes_served (GstElement * sink, guint64 bytes) } } -static void -fail_if_can_read (char *msg, int fd) -{ - long avail; - - /* verify this hasn't triggered a write yet */ - /* FIXME: possibly racy, since if it would write, we may not get it - * immediately ? */ - fail_if (ioctl (fd, FIONREAD, &avail) < 0, "%s: could not ioctl", msg); - fail_if (avail > 0, "%s: has bytes available to read"); -} +/* FIXME: possibly racy, since if it would write, we may not get it + * immediately ? */ +#define fail_unless_read(msg,fd) \ +G_STMT_START { \ + long avail; \ +\ + fail_if (ioctl (fd, FIONREAD, &avail) < 0, "%s: could not ioctl", msg); \ + fail_if (avail > 0, "%s: has bytes available to read"); \ +} G_STMT_END; GST_START_TEST (test_no_clients)