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