mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
sizeof style
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: message.c,v 1.217 2003/04/11 07:25:25 marka Exp $ */
|
||||
/* $Id: message.c,v 1.218 2003/09/11 01:49:16 marka Exp $ */
|
||||
|
||||
/***
|
||||
*** Imports
|
||||
@@ -3065,7 +3065,7 @@ dns_message_totext(dns_message_t *msg, const dns_master_style_t *style,
|
||||
msg->counts[DNS_SECTION_AUTHORITY]);
|
||||
ADD_STRING(target, buf);
|
||||
ADD_STRING(target, ", ADDITIONAL: ");
|
||||
snprintf(buf, sizeof buf, "%1u",
|
||||
snprintf(buf, sizeof(buf), "%1u",
|
||||
msg->counts[DNS_SECTION_ADDITIONAL]);
|
||||
ADD_STRING(target, buf);
|
||||
ADD_STRING(target, "\n");
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdata.c,v 1.178 2003/07/30 00:54:26 marka Exp $ */
|
||||
/* $Id: rdata.c,v 1.179 2003/09/11 01:49:16 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <ctype.h>
|
||||
@@ -1037,7 +1037,7 @@ dns_mnemonic_totext(unsigned int value, isc_buffer_t *target,
|
||||
}
|
||||
i++;
|
||||
}
|
||||
snprintf(buf, sizeof buf, "%u", value);
|
||||
snprintf(buf, sizeof(buf), "%u", value);
|
||||
return (str_totext(buf, target));
|
||||
}
|
||||
|
||||
@@ -1198,7 +1198,7 @@ dns_rdatatype_totext(dns_rdatatype_t type, isc_buffer_t *target) {
|
||||
|
||||
if (type < (sizeof(typeattr)/sizeof(typeattr[0])))
|
||||
return (str_totext(typeattr[type].name, target));
|
||||
snprintf(buf, sizeof buf, "TYPE%u", type);
|
||||
snprintf(buf, sizeof(buf), "TYPE%u", type);
|
||||
return (str_totext(buf, target));
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zone.c,v 1.396 2003/07/25 00:01:06 marka Exp $ */
|
||||
/* $Id: zone.c,v 1.397 2003/09/11 01:49:16 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1882,12 +1882,12 @@ dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *notify,
|
||||
zone->notifycnt = 0;
|
||||
}
|
||||
if (count != 0) {
|
||||
new = isc_mem_get(zone->mctx, count * sizeof *new);
|
||||
new = isc_mem_get(zone->mctx, count * sizeof(*new));
|
||||
if (new == NULL) {
|
||||
UNLOCK_ZONE(zone);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
memcpy(new, notify, count * sizeof *new);
|
||||
memcpy(new, notify, count * sizeof(*new));
|
||||
zone->notify = new;
|
||||
zone->notifycnt = count;
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: entropy.c,v 1.68 2002/06/20 01:19:51 marka Exp $ */
|
||||
/* $Id: entropy.c,v 1.69 2003/09/11 01:49:17 marka Exp $ */
|
||||
|
||||
/*
|
||||
* This is the system depenedent part of the ISC entropy API.
|
||||
@@ -515,10 +515,10 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
|
||||
if (is_usocket) {
|
||||
struct sockaddr_un sname;
|
||||
|
||||
memset(&sname, 0, sizeof sname);
|
||||
memset(&sname, 0, sizeof(sname));
|
||||
sname.sun_family = AF_UNIX;
|
||||
strncpy(sname.sun_path, fname, sizeof sname.sun_path);
|
||||
sname.sun_path[sizeof sname.sun_path-1] = '0';
|
||||
strncpy(sname.sun_path, fname, sizeof(sname.sun_path));
|
||||
sname.sun_path[sizeof(sname.sun_path)-1] = '0';
|
||||
#ifdef ISC_PLATFORM_HAVESALEN
|
||||
#if !defined(SUN_LEN)
|
||||
#define SUN_LEN(su) \
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: socket.c,v 1.22 2003/07/09 03:28:44 marka Exp $ */
|
||||
/* $Id: socket.c,v 1.23 2003/09/11 01:49:17 marka Exp $ */
|
||||
|
||||
/* This code has been rewritten to take advantage of Windows Sockets
|
||||
* I/O Completion Ports and Events. I/O Completion Ports is ONLY
|
||||
@@ -1017,7 +1017,7 @@ socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
|
||||
msgcat, msgset, message,
|
||||
"socket %p: %s", sock, msgbuf);
|
||||
} else {
|
||||
isc_sockaddr_format(address, peerbuf, sizeof peerbuf);
|
||||
isc_sockaddr_format(address, peerbuf, sizeof(peerbuf));
|
||||
isc_log_iwrite(isc_lctx, category, module, level,
|
||||
msgcat, msgset, message,
|
||||
"socket %p %s: %s", sock, peerbuf, msgbuf);
|
||||
@@ -1680,7 +1680,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
|
||||
isc_socket_t *sock;
|
||||
isc_result_t ret;
|
||||
|
||||
sock = isc_mem_get(manager->mctx, sizeof *sock);
|
||||
sock = isc_mem_get(manager->mctx, sizeof(*sock));
|
||||
|
||||
if (sock == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
@@ -2069,7 +2069,7 @@ internal_accept(isc_socket_t *sock, int accept_errno) {
|
||||
* EAGAIN or EINTR, the event wait will be notified again since
|
||||
* the event will be reset on return to caller.
|
||||
*/
|
||||
addrlen = sizeof dev->newsocket->address.type;
|
||||
addrlen = sizeof(dev->newsocket->address.type);
|
||||
memset(&dev->newsocket->address.type.sa, 0, addrlen);
|
||||
fd = accept(sock->fd, &dev->newsocket->address.type.sa,
|
||||
(void *)&addrlen);
|
||||
@@ -2747,7 +2747,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
|
||||
DESTROYLOCK(&manager->lock);
|
||||
manager->magic = 0;
|
||||
mctx= manager->mctx;
|
||||
isc_mem_put(mctx, manager, sizeof *manager);
|
||||
isc_mem_put(mctx, manager, sizeof(*manager));
|
||||
|
||||
isc_mem_detach(&mctx);
|
||||
|
||||
@@ -3105,7 +3105,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr) {
|
||||
return (ISC_R_FAMILYMISMATCH);
|
||||
}
|
||||
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on,
|
||||
sizeof on) < 0) {
|
||||
sizeof(on)) < 0) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"setsockopt(%d) %s", sock->fd,
|
||||
isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
|
||||
@@ -3429,7 +3429,7 @@ isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
|
||||
|
||||
ret = ISC_R_SUCCESS;
|
||||
|
||||
len = sizeof addressp->type;
|
||||
len = sizeof(addressp->type);
|
||||
if (getsockname(sock->fd, &addressp->type.sa, (void *)&len) < 0) {
|
||||
isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "getsockname: %s",
|
||||
|
@@ -51,7 +51,7 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static const char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93";
|
||||
static const char rcsid[] =
|
||||
"$Id: herror.c,v 1.11 2001/11/27 01:56:30 gson Exp $";
|
||||
"$Id: herror.c,v 1.12 2003/09/11 01:49:18 marka Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <config.h>
|
||||
|
Reference in New Issue
Block a user