diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-10-13 12:05:28 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-10-14 09:14:34 -0500 |
commit | 9ac1528e54531006c936b64d3a5f50214e91e33c (patch) | |
tree | 2a2b9a76bbc185595408e327647f6335a5555071 | |
parent | c2c89b667e99cc5248da9a632db534a9c94193e3 (diff) | |
download | gnome-calendar-mcatanzaro/#647.tar.gz |
gcal-timeline: completed_calendars should be unsignedmcatanzaro/#647
In on_calendar_monitor_completed_cb() we have this assert:
g_assert (self->completed_calendars <= g_hash_table_size (self->calendars));
That is comparing a signed integer to unsigned. This is dangerous. We
could add casts to say that we really want to do it, but
completed_calendars should never be negative, so might as well use
unsigned.
-rw-r--r-- | src/core/gcal-timeline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/gcal-timeline.c b/src/core/gcal-timeline.c index 4e24842b..dcec4cb3 100644 --- a/src/core/gcal-timeline.c +++ b/src/core/gcal-timeline.c @@ -70,7 +70,7 @@ struct _GcalTimeline gchar *filter; GHashTable *calendars; /* GcalCalendar* -> GcalCalendarMonitor* */ - gint completed_calendars; + guint completed_calendars; GHashTable *subscribers; /* GcalTimelineSubscriber* -> SubscriberData* */ GcalRangeTree *subscriber_ranges; |