[glib: 3/8] Fix global variable name hidden by local variables in gio/tests/pollable.c




commit 4e3f704d4907008daa7d7e416891834def795ac5
Author: Loic Le Page <llepage fluendo com>
Date:   Wed Jan 19 14:38:13 2022 +0100

    Fix global variable name hidden by local variables in gio/tests/pollable.c

 gio/tests/pollable.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gio/tests/pollable.c b/gio/tests/pollable.c
index 97c26c25da..ef6905b414 100644
--- a/gio/tests/pollable.c
+++ b/gio/tests/pollable.c
@@ -36,12 +36,12 @@
 #error Should have been able to find openpty on GNU/Linux
 #endif
 
-GMainLoop *loop;
-GPollableInputStream *in;
-GOutputStream *out;
+static GMainLoop *loop;
+static GPollableInputStream *in;
+static GOutputStream *out;
 
 static gboolean
-poll_source_callback (GPollableInputStream *in,
+poll_source_callback (GPollableInputStream *input,
                      gpointer              user_data)
 {
   GError *error = NULL;
@@ -49,13 +49,13 @@ poll_source_callback (GPollableInputStream *in,
   gssize nread;
   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_cmpint (nread, ==, 2);
   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;
   return G_SOURCE_REMOVE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]