[glib: 10/11] Fix global variable name hidden by local variables in glib/tests/dataset.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 10/11] Fix global variable name hidden by local variables in glib/tests/dataset.c
- Date: Tue, 22 Feb 2022 08:40:05 +0000 (UTC)
commit d15e6f7c9cbe9a9afc67bfbbdeeb8e9ae2981ce3
Author: Loic Le Page <llepage fluendo com>
Date: Wed Jan 19 12:35:21 2022 +0100
Fix global variable name hidden by local variables in glib/tests/dataset.c
glib/tests/dataset.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/glib/tests/dataset.c b/glib/tests/dataset.c
index a92760554..b02b3e42b 100644
--- a/glib/tests/dataset.c
+++ b/glib/tests/dataset.c
@@ -179,13 +179,13 @@ test_dataset_id (void)
g_assert (ret == NULL);
}
-static GData *list;
+static GData *global_list;
static void
free_one (gpointer data)
{
/* recurse */
- g_datalist_clear (&list);
+ g_datalist_clear (&global_list);
}
static void
@@ -194,11 +194,11 @@ test_datalist_clear (void)
/* Need to use a subprocess because it will deadlock if it fails */
if (g_test_subprocess ())
{
- g_datalist_init (&list);
- g_datalist_set_data_full (&list, "one", GINT_TO_POINTER (1), free_one);
- g_datalist_set_data_full (&list, "two", GINT_TO_POINTER (2), NULL);
- g_datalist_clear (&list);
- g_assert (list == NULL);
+ g_datalist_init (&global_list);
+ g_datalist_set_data_full (&global_list, "one", GINT_TO_POINTER (1), free_one);
+ g_datalist_set_data_full (&global_list, "two", GINT_TO_POINTER (2), NULL);
+ g_datalist_clear (&global_list);
+ g_assert (global_list == NULL);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]