mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 12:40:00 -04:00
3818. [bug] Stop lying to the optimizer that 'void *arg' is a
constant in isc_event_allocate.
(cherry picked from commit e916c4f840)
This commit is contained in:
parent
27cf9fea54
commit
336c54e9ac
3 changed files with 27 additions and 2 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
3818. [bug] Stop lying to the optimizer that 'void *arg' is a
|
||||
constant in isc_event_allocate.
|
||||
|
||||
3815. [doc] Clarify "nsupdate -y" usage in man page. [RT #35808]
|
||||
|
||||
3809. [doc] Fix NSID documentation.
|
||||
|
|
|
|||
|
|
@ -41,7 +41,26 @@ destroy(isc_event_t *event) {
|
|||
|
||||
isc_event_t *
|
||||
isc_event_allocate(isc_mem_t *mctx, void *sender, isc_eventtype_t type,
|
||||
isc_taskaction_t action, const void *arg, size_t size)
|
||||
isc_taskaction_t action, void *arg, size_t size)
|
||||
{
|
||||
isc_event_t *event;
|
||||
|
||||
REQUIRE(size >= sizeof(struct isc_event));
|
||||
REQUIRE(action != NULL);
|
||||
|
||||
event = isc_mem_get(mctx, size);
|
||||
if (event == NULL)
|
||||
return (NULL);
|
||||
|
||||
ISC_EVENT_INIT(event, size, 0, NULL, type, action, arg,
|
||||
sender, destroy, mctx);
|
||||
|
||||
return (event);
|
||||
}
|
||||
|
||||
isc_event_t *
|
||||
isc_event_constallocate(isc_mem_t *mctx, void *sender, isc_eventtype_t type,
|
||||
isc_taskaction_t action, const void *arg, size_t size)
|
||||
{
|
||||
isc_event_t *event;
|
||||
void *deconst_arg;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,10 @@ ISC_LANG_BEGINDECLS
|
|||
|
||||
isc_event_t *
|
||||
isc_event_allocate(isc_mem_t *mctx, void *sender, isc_eventtype_t type,
|
||||
isc_taskaction_t action, const void *arg, size_t size);
|
||||
isc_taskaction_t action, void *arg, size_t size);
|
||||
isc_event_t *
|
||||
isc_event_constallocate(isc_mem_t *mctx, void *sender, isc_eventtype_t type,
|
||||
isc_taskaction_t action, const void *arg, size_t size);
|
||||
/*%<
|
||||
* Allocate an event structure.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue