/* Returns: the last element in the #GSList, or NULL if the #GSList has no elements  */
GSList* g_slist_last(GSList *list)
/* Returns: the last element in the #GSList, or NULL if the #GSList has no elements  */
GSList* g_slist_last(GSList *list)
{
  if (list)
    {
      while (list->next)
        list = list->next;
    }
  return list;
}