mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
hide ((isc_event_t **) (void *)) cast using a macro, ISC_EVENT_PTR.
This commit is contained in:
@@ -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