From: Niels Provos Date: Thu, 12 Jun 2008 14:43:35 +0000 (+0000) Subject: allow min_heap_erase to be called on removed members; from liusifan X-Git-Tag: release-2.0.1-alpha~268 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6ce520cfbcfa21406406b1649ee3ba99307a797;p=libevent allow min_heap_erase to be called on removed members; from liusifan svn:r849 --- diff --git a/ChangeLog b/ChangeLog index 1878f8ea..c33b1e74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -107,6 +107,7 @@ Changes in current version: o support for selecting event backends by their features, and for querying the features of a backend. o change failing behavior of event_base_new_with_config: if a config is provided and no backend is selected, return NULL instead of aborting. o deliver partial data to request callbacks when chunked callback is set even if there is no chunking on the http level; allows cancelation of requests from within the chunked callback; from Scott Lamb. + o allow min_heap_erase to be called on removed members; from liusifan. Changes in 1.4.0: o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr. diff --git a/min_heap.h b/min_heap.h index ac0ea674..ad0043f1 100644 --- a/min_heap.h +++ b/min_heap.h @@ -75,8 +75,8 @@ struct event* min_heap_pop(min_heap_t* s) if(s->n) { struct event* e = *s->p; - e->min_heap_idx = -1; min_heap_shift_down_(s, 0u, s->p[--s->n]); + e->min_heap_idx = -1; return e; } return 0;