[Libevent-users] event->min_heap_idx may be not -1 after min_heap_pop

Niels Provos provos at citi.umich.edu
Thu Jun 12 10:46:17 EDT 2008


On Thu, Jun 12, 2008 at 6:16 AM, liusifan <liusifan at gmail.com> wrote:
> After reading the min_heap.h, I found the min_heap_pop may be has a bug
[...]
>        evp = min_heap_pop( &heap );
>        min_heap_erase( &heap, evp );

Hi Liusifan,

thanks for the report; I changed min_heap_pop to set the index to -1
after the shift down.

Niels.


More information about the Libevent-users mailing list