mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
Fix global variable name hidden by local variables in gio/tests/pollable.c
This commit is contained in:
parent
25ab7f1e74
commit
4e3f704d49
@ -36,12 +36,12 @@
|
|||||||
#error Should have been able to find openpty on GNU/Linux
|
#error Should have been able to find openpty on GNU/Linux
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GMainLoop *loop;
|
static GMainLoop *loop;
|
||||||
GPollableInputStream *in;
|
static GPollableInputStream *in;
|
||||||
GOutputStream *out;
|
static GOutputStream *out;
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
poll_source_callback (GPollableInputStream *in,
|
poll_source_callback (GPollableInputStream *input,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
@ -49,13 +49,13 @@ poll_source_callback (GPollableInputStream *in,
|
|||||||
gssize nread;
|
gssize nread;
|
||||||
gboolean *success = user_data;
|
gboolean *success = user_data;
|
||||||
|
|
||||||
g_assert_true (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (in)));
|
g_assert_true (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (input)));
|
||||||
|
|
||||||
nread = g_pollable_input_stream_read_nonblocking (in, buf, 2, NULL, &error);
|
nread = g_pollable_input_stream_read_nonblocking (input, buf, 2, NULL, &error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_assert_cmpint (nread, ==, 2);
|
g_assert_cmpint (nread, ==, 2);
|
||||||
g_assert_cmpstr (buf, ==, "x");
|
g_assert_cmpstr (buf, ==, "x");
|
||||||
g_assert_false (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (in)));
|
g_assert_false (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (input)));
|
||||||
|
|
||||||
*success = TRUE;
|
*success = TRUE;
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
|
Loading…
Reference in New Issue
Block a user