[Bug 53345] _get_dates returns the same date twice if there are both call and text events
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Aug 16 20:26:05 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=53345
--- Comment #2 from Nicolas Dufresne <nicolas.dufresne at collabora.co.uk> 2012-08-16 18:26:05 UTC ---
Comment on attachment 65391
--> https://bugs.freedesktop.org/attachment.cgi?id=65391
log-store-xml: Filter out duplicate dates in get_dates
Review of attachment 65391:
--> (https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=53345&attachment=65391)
-----------------------------------------------------------------
::: telepathy-logger/log-store-xml.c
@@ +998,5 @@
> + }
> + else
> + l = m;
> + }
> +
Here I would improve the style using something like (not tested):
/* Filter out duplicate dates in-place */
for (l = dates; g_list_next (l) != NULL; l = g_list_next (l))
{
GList *next = g_list_next (l);
if (g_date_compare ((GDate *) next->data, (GDate *) l->date) == 0)
{
g_date_free (GDate *) next->data;
l = g_list_delete_link (l, next);
}
}
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list