gcal-timeline: completed_calendars should be unsigned

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.
This commit is contained in:
Michael Catanzaro
2020-10-14 09:14:34 -05:00
parent c2c89b667e
commit 9ac1528e54
+1 -1
View File
@@ -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;