[glib: 1/10] Fix global variable name hidden by local variables in glib/tests/cond.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/10] Fix global variable name hidden by local variables in glib/tests/cond.c
- Date: Thu, 31 Mar 2022 23:36:39 +0000 (UTC)
commit 7c138574bdf30118ec0161bcee9746cabdf541f3
Author: Loic Le Page <llepage fluendo com>
Date: Wed Jan 19 17:45:38 2022 +0100
Fix global variable name hidden by local variables in glib/tests/cond.c
glib/tests/cond.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/glib/tests/cond.c b/glib/tests/cond.c
index bcd8fbd8c7..b179b3deeb 100644
--- a/glib/tests/cond.c
+++ b/glib/tests/cond.c
@@ -239,7 +239,7 @@ test_wait_until (void)
{
gint64 until;
GMutex lock;
- GCond cond;
+ GCond local_cond;
/* This test will make sure we don't wait too much or too little.
*
@@ -249,13 +249,13 @@ test_wait_until (void)
* should not wake up until the specified time has passed.
*/
g_mutex_init (&lock);
- g_cond_init (&cond);
+ g_cond_init (&local_cond);
until = g_get_monotonic_time () + G_TIME_SPAN_SECOND;
/* Could still have spurious wakeups, so we must loop... */
g_mutex_lock (&lock);
- while (g_cond_wait_until (&cond, &lock, until))
+ while (g_cond_wait_until (&local_cond, &lock, until))
;
g_mutex_unlock (&lock);
@@ -265,11 +265,11 @@ test_wait_until (void)
/* Make sure it returns FALSE on timeout */
until = g_get_monotonic_time () + G_TIME_SPAN_SECOND / 50;
g_mutex_lock (&lock);
- g_assert (g_cond_wait_until (&cond, &lock, until) == FALSE);
+ g_assert (g_cond_wait_until (&local_cond, &lock, until) == FALSE);
g_mutex_unlock (&lock);
g_mutex_clear (&lock);
- g_cond_clear (&cond);
+ g_cond_clear (&local_cond);
}
#ifdef __linux__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]