mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
hide ((isc_event_t **) (void *)) cast using a macro, ISC_EVENT_PTR.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-signzone.c,v 1.177 2004/03/10 02:19:51 marka Exp $ */
|
||||
/* $Id: dnssec-signzone.c,v 1.178 2004/04/15 01:58:22 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1113,7 +1113,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
|
||||
|
||||
sevent->node = node;
|
||||
sevent->fname = fname;
|
||||
isc_task_send(worker, (isc_event_t **) (void*) &sevent);
|
||||
isc_task_send(worker, ISC_EVENT_PTR(&sevent));
|
||||
assigned++;
|
||||
}
|
||||
|
||||
@@ -1169,7 +1169,7 @@ sign(isc_task_t *task, isc_event_t *event) {
|
||||
fatal("failed to allocate event\n");
|
||||
wevent->node = node;
|
||||
wevent->fname = fname;
|
||||
isc_task_send(master, (isc_event_t **) (void*) &wevent);
|
||||
isc_task_send(master, ISC_EVENT_PTR(&wevent));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: query.c,v 1.257 2004/03/10 02:19:52 marka Exp $ */
|
||||
/* $Id: query.c,v 1.258 2004/04/15 01:58:23 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -3276,7 +3276,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
dns_db_detach(&zdb);
|
||||
}
|
||||
if (event != NULL)
|
||||
isc_event_free((isc_event_t **) (void*)&event);
|
||||
isc_event_free(ISC_EVENT_PTR(&event));
|
||||
|
||||
/*
|
||||
* AA bit.
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: update.c,v 1.109 2004/03/05 04:57:49 marka Exp $ */
|
||||
/* $Id: update.c,v 1.110 2004/04/15 01:58:23 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1965,11 +1965,11 @@ send_update_event(ns_client_t *client, dns_zone_t *zone) {
|
||||
event->ev_arg = evclient;
|
||||
|
||||
dns_zone_gettask(zone, &zonetask);
|
||||
isc_task_send(zonetask, (isc_event_t **) (void *)&event);
|
||||
isc_task_send(zonetask, ISC_EVENT_PTR(&event));
|
||||
|
||||
failure:
|
||||
if (event != NULL)
|
||||
isc_event_free((isc_event_t **) (void *)&event);
|
||||
isc_event_free(ISC_EVENT_PTR(&event));
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -2723,7 +2723,7 @@ forward_callback(void *arg, isc_result_t result, dns_message_t *answer) {
|
||||
uev->ev_action = forward_done;
|
||||
uev->answer = answer;
|
||||
}
|
||||
isc_task_send(client->task, (isc_event_t **) (void *)&uev);
|
||||
isc_task_send(client->task, ISC_EVENT_PTR(&uev));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2777,10 +2777,10 @@ send_forward_event(ns_client_t *client, dns_zone_t *zone) {
|
||||
event->ev_arg = evclient;
|
||||
|
||||
dns_zone_gettask(zone, &zonetask);
|
||||
isc_task_send(zonetask, (isc_event_t **) (void *)&event);
|
||||
isc_task_send(zonetask, ISC_EVENT_PTR(&event));
|
||||
|
||||
failure:
|
||||
if (event != NULL)
|
||||
isc_event_free((isc_event_t **) (void *)&event);
|
||||
isc_event_free(ISC_EVENT_PTR(&event));
|
||||
return (result);
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dispatch.c,v 1.116 2004/03/05 05:09:19 marka Exp $ */
|
||||
/* $Id: dispatch.c,v 1.117 2004/04/15 01:58:24 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -672,7 +672,7 @@ udp_recv(isc_task_t *task, isc_event_t *ev_in) {
|
||||
rev, rev->buffer.base, rev->buffer.length,
|
||||
resp->task);
|
||||
resp->item_out = ISC_TRUE;
|
||||
isc_task_send(resp->task, (isc_event_t **) (void *)&rev);
|
||||
isc_task_send(resp->task, ISC_EVENT_PTR(&rev));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -856,7 +856,7 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) {
|
||||
rev, rev->buffer.base, rev->buffer.length,
|
||||
resp->task);
|
||||
resp->item_out = ISC_TRUE;
|
||||
isc_task_send(resp->task, (isc_event_t **) (void *)&rev);
|
||||
isc_task_send(resp->task, ISC_EVENT_PTR(&rev));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2078,7 +2078,7 @@ do_cancel(dns_dispatch_t *disp, dns_dispentry_t *resp) {
|
||||
"cancel: failsafe event %p -> task %p",
|
||||
ev, resp->task);
|
||||
resp->item_out = ISC_TRUE;
|
||||
isc_task_send(resp->task, (isc_event_t **) (void *)&ev);
|
||||
isc_task_send(resp->task, ISC_EVENT_PTR(&ev));
|
||||
}
|
||||
|
||||
isc_socket_t *
|
||||
@@ -2174,7 +2174,7 @@ dns_dispatch_importrecv(dns_dispatch_t *disp, isc_event_t *event) {
|
||||
|
||||
buf = allocate_udp_buffer(disp);
|
||||
if (buf == NULL) {
|
||||
isc_event_free((isc_event_t **) (void *)&newsevent);
|
||||
isc_event_free(ISC_EVENT_PTR(&newsevent));
|
||||
return;
|
||||
}
|
||||
memcpy(buf, sevent->region.base, sevent->n);
|
||||
@@ -2187,7 +2187,7 @@ dns_dispatch_importrecv(dns_dispatch_t *disp, isc_event_t *event) {
|
||||
newsevent->pktinfo = sevent->pktinfo;
|
||||
newsevent->attributes = sevent->attributes;
|
||||
|
||||
isc_task_send(disp->task, (isc_event_t **) (void*)&newsevent);
|
||||
isc_task_send(disp->task, ISC_EVENT_PTR(&newsevent));
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lookup.c,v 1.14 2004/03/05 05:09:21 marka Exp $ */
|
||||
/* $Id: lookup.c,v 1.15 2004/04/15 01:58:24 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -316,7 +316,7 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
|
||||
dns_db_detachnode(event->db, &event->node);
|
||||
if (event->db != NULL)
|
||||
dns_db_detach(&event->db);
|
||||
isc_event_free((isc_event_t **) (void *)&event);
|
||||
isc_event_free(ISC_EVENT_PTR(&event));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resolver.c,v 1.284 2004/03/16 05:52:19 marka Exp $ */
|
||||
/* $Id: resolver.c,v 1.285 2004/04/15 01:58:24 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -721,7 +721,7 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result) {
|
||||
fctx->type == dns_rdatatype_any ||
|
||||
fctx->type == dns_rdatatype_rrsig);
|
||||
|
||||
isc_task_sendanddetach(&task, (isc_event_t **) (void *)&event);
|
||||
isc_task_sendanddetach(&task, ISC_EVENT_PTR(&event));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6024,7 +6024,7 @@ dns_resolver_cancelfetch(dns_fetch_t *fetch) {
|
||||
etask = event->ev_sender;
|
||||
event->ev_sender = fctx;
|
||||
event->result = ISC_R_CANCELED;
|
||||
isc_task_sendanddetach(&etask, (isc_event_t **) (void *)&event);
|
||||
isc_task_sendanddetach(&etask, ISC_EVENT_PTR(&event));
|
||||
}
|
||||
/*
|
||||
* The fctx continues running even if no fetches remain;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: validator.c,v 1.119 2004/03/10 02:19:56 marka Exp $ */
|
||||
/* $Id: validator.c,v 1.120 2004/04/15 01:58:24 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -2384,7 +2384,7 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
|
||||
ISC_LINK_INIT(val, link);
|
||||
val->magic = VALIDATOR_MAGIC;
|
||||
|
||||
isc_task_send(task, (isc_event_t **) (void *)&event);
|
||||
isc_task_send(task, ISC_EVENT_PTR(&event));
|
||||
|
||||
*validatorp = val;
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: event.h,v 1.27 2004/03/05 05:10:56 marka Exp $ */
|
||||
/* $Id: event.h,v 1.28 2004/04/15 01:58:25 marka Exp $ */
|
||||
|
||||
#ifndef ISC_EVENT_H
|
||||
#define ISC_EVENT_H 1
|
||||
@@ -82,6 +82,8 @@ struct isc_event {
|
||||
#define ISC_EVENTTYPE_FIRSTEVENT 0x00000000
|
||||
#define ISC_EVENTTYPE_LASTEVENT 0xffffffff
|
||||
|
||||
#define ISC_EVENT_PTR(p) ((isc_event_t **)(void *)(p))
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_event_t *
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: socket.c,v 1.237 2004/03/18 02:58:07 marka Exp $ */
|
||||
/* $Id: socket.c,v 1.238 2004/04/15 01:58:25 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1958,7 +1958,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
|
||||
task = dev->ev_sender;
|
||||
dev->ev_sender = sock;
|
||||
|
||||
isc_task_sendanddetach(&task, (isc_event_t **) (void *)&dev);
|
||||
isc_task_sendanddetach(&task, ISC_EVENT_PTR(&dev));
|
||||
return;
|
||||
|
||||
soft_error:
|
||||
@@ -2997,7 +2997,7 @@ isc_socket_accept(isc_socket_t *sock,
|
||||
|
||||
ret = allocate_socket(manager, sock->type, &nsock);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
isc_event_free((isc_event_t **) (void *)&dev);
|
||||
isc_event_free(ISC_EVENT_PTR(&dev));
|
||||
UNLOCK(&sock->lock);
|
||||
return (ret);
|
||||
}
|
||||
@@ -3097,12 +3097,12 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "%d/%s", errno, strbuf);
|
||||
|
||||
UNLOCK(&sock->lock);
|
||||
isc_event_free((isc_event_t **) (void *)&dev);
|
||||
isc_event_free(ISC_EVENT_PTR(&dev));
|
||||
return (ISC_R_UNEXPECTED);
|
||||
|
||||
err_exit:
|
||||
sock->connected = 0;
|
||||
isc_task_send(task, (isc_event_t **) (void *)&dev);
|
||||
isc_task_send(task, ISC_EVENT_PTR(&dev));
|
||||
|
||||
UNLOCK(&sock->lock);
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -3115,7 +3115,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
|
||||
sock->connected = 1;
|
||||
sock->bound = 1;
|
||||
dev->result = ISC_R_SUCCESS;
|
||||
isc_task_send(task, (isc_event_t **) (void *)&dev);
|
||||
isc_task_send(task, ISC_EVENT_PTR(&dev));
|
||||
|
||||
UNLOCK(&sock->lock);
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -3253,7 +3253,7 @@ internal_connect(isc_task_t *me, isc_event_t *ev) {
|
||||
|
||||
task = dev->ev_sender;
|
||||
dev->ev_sender = sock;
|
||||
isc_task_sendanddetach(&task, (isc_event_t **) (void *)&dev);
|
||||
isc_task_sendanddetach(&task, ISC_EVENT_PTR(&dev));
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
@@ -3401,7 +3401,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
|
||||
dev->result = ISC_R_CANCELED;
|
||||
dev->ev_sender = sock;
|
||||
isc_task_sendanddetach(¤t_task,
|
||||
(isc_event_t **) (void *)&dev);
|
||||
ISC_EVENT_PTR(&dev));
|
||||
}
|
||||
|
||||
dev = next;
|
||||
@@ -3428,7 +3428,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
|
||||
dev->result = ISC_R_CANCELED;
|
||||
dev->ev_sender = sock;
|
||||
isc_task_sendanddetach(¤t_task,
|
||||
(isc_event_t **) (void *)&dev);
|
||||
ISC_EVENT_PTR(&dev));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user