From b39326d06e2f13d34503e1893d14e20c27f4c08a Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Thu, 26 Aug 1999 01:29:17 +0000 Subject: [PATCH] sizeof() the right thing --- lib/isc/unix/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 4782a61376..b1cb16da47 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -892,7 +892,7 @@ internal_recv(isc_task_t *me, isc_event_t *ev) if (sock->type == isc_sockettype_udp) { memset(&dev->address, 0, sizeof(dev->address)); msghdr.msg_name = (void *)&dev->address.type.sa; - msghdr.msg_namelen = sizeof (dev->address.type.sa); + msghdr.msg_namelen = sizeof (dev->address.type); } else { msghdr.msg_name = NULL; msghdr.msg_namelen = 0; @@ -1627,7 +1627,7 @@ isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, if (sock->type == isc_sockettype_udp) { memset(&dev->address, 0, sizeof(dev->address)); msghdr.msg_name = (void *)&dev->address.type.sa; - msghdr.msg_namelen = sizeof (dev->address.type.sa); + msghdr.msg_namelen = sizeof (dev->address.type); } else { msghdr.msg_name = NULL; msghdr.msg_namelen = 0;