[gnome-builder] egg-task-cache: use guint for iter
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] egg-task-cache: use guint for iter
- Date: Mon, 6 Mar 2017 22:25:58 +0000 (UTC)
commit 75f7bfdcf5c21fbed4ee38cf160db2f0be33c0a2
Author: Christian Hergert <chergert redhat com>
Date: Mon Mar 6 14:23:43 2017 -0800
egg-task-cache: use guint for iter
We use < for comparison and GPtrArray.len is uint, so it's perfectly safe
to use the same width integer here.
https://bugzilla.gnome.org/show_bug.cgi?id=779660
contrib/egg/egg-task-cache.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/contrib/egg/egg-task-cache.c b/contrib/egg/egg-task-cache.c
index 45e9909..1ad93ac 100644
--- a/contrib/egg/egg-task-cache.c
+++ b/contrib/egg/egg-task-cache.c
@@ -493,9 +493,7 @@ egg_task_cache_cancelled_cb (GCancellable *cancellable,
if ((queued = g_hash_table_lookup (self->queued, data->key)))
{
- gsize i;
-
- for (i = 0; i < queued->len; i++)
+ for (guint i = 0; i < queued->len; i++)
{
GCancellable *queued_cancellable;
GTask *queued_task;
@@ -506,7 +504,7 @@ egg_task_cache_cancelled_cb (GCancellable *cancellable,
if (queued_task == task && queued_cancellable == cancellable)
{
cancelled = g_task_return_error_if_cancelled (task);
- g_ptr_array_remove_index_fast (queued, (guint) i);
+ g_ptr_array_remove_index_fast (queued, i);
EGG_COUNTER_DEC (queued);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]