Re: [gtk-list] g_list_remove_link bug
- From: Andy Kahn <kahn zk3 dec com>
- To: Roland Bock <rbock eudoxos de>
- Cc: gtk-list <gtk-list redhat com>
- Subject: Re: [gtk-list] g_list_remove_link bug
- Date: Tue, 8 Jun 1999 15:07:06 -0400
On Tue, Jun 08, 1999 at 08:09:12PM +0200, Roland Bock wrote:
> Hi!
> I think there is a bug in glib-1.2:
>
> In function
>
> GList*
> g_list_remove_link (GList *list,
> GList *link)
>
> link is removed from the list. If link and list are identical, then
> list=list->next. This is good most of the time, but when list (and link)
> is the last element of the list, this results in list=NULL.
>
...
This is what I would expect it to do, because my understanding is that
g_list_remove_link() assumes that "list" is the head of a linked list.
If the linked list only contains one element, hence "list" is also the
last element, then removing "link" when "link" is pointing at head
will result in a linked list with zero elements.
regards,
--andy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]