Commit f3ca27e9 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

sizeof style

parent e3e94dd1
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: adb.c,v 1.190 2001/11/07 22:40:33 gson Exp $ */
/* $Id: adb.c,v 1.191 2001/11/12 19:05:10 gson Exp $ */
/*
* Implementation notes
......@@ -1515,7 +1515,7 @@ new_adbfind(dns_adb_t *adb) {
return (NULL);
}
ISC_EVENT_INIT(&h->event, sizeof (isc_event_t), 0, 0, 0, NULL, NULL,
ISC_EVENT_INIT(&h->event, sizeof(isc_event_t), 0, 0, 0, NULL, NULL,
NULL, NULL, h);
h->magic = DNS_ADBFIND_MAGIC;
......@@ -2168,7 +2168,7 @@ destroy(dns_adb_t *adb) {
DESTROYLOCK(&adb->lock);
DESTROYLOCK(&adb->mplock);
isc_mem_putanddetach(&adb->mctx, adb, sizeof (dns_adb_t));
isc_mem_putanddetach(&adb->mctx, adb, sizeof(dns_adb_t));
}
......@@ -2190,7 +2190,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
REQUIRE(taskmgr != NULL);
REQUIRE(newadb != NULL && *newadb == NULL);
adb = isc_mem_get(mem, sizeof (dns_adb_t));
adb = isc_mem_get(mem, sizeof(dns_adb_t));
if (adb == NULL)
return (ISC_R_NOMEMORY);
......@@ -2216,7 +2216,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
adb->timermgr = timermgr;
adb->taskmgr = taskmgr;
adb->next_cleanbucket = 0;
ISC_EVENT_INIT(&adb->cevent, sizeof adb->cevent, 0, NULL,
ISC_EVENT_INIT(&adb->cevent, sizeof(adb->cevent), 0, NULL,
DNS_EVENT_ADBCONTROL, shutdown_task, adb,
adb, NULL, NULL);
adb->cevent_sent = ISC_FALSE;
......@@ -2265,7 +2265,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
* Memory pools
*/
#define MPINIT(t, p, n) do { \
result = isc_mempool_create(mem, sizeof (t), &(p)); \
result = isc_mempool_create(mem, sizeof(t), &(p)); \
if (result != ISC_R_SUCCESS) \
goto fail3; \
isc_mempool_setfreemax((p), FREE_ITEMS); \
......@@ -2349,7 +2349,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
fail0c:
DESTROYLOCK(&adb->lock);
fail0b:
isc_mem_putanddetach(&adb->mctx, adb, sizeof (dns_adb_t));
isc_mem_putanddetach(&adb->mctx, adb, sizeof(dns_adb_t));
return (result);
}
......@@ -3009,7 +3009,7 @@ dump_entry(FILE *f, dns_adbentry_t *entry, isc_boolean_t debug)
isc_netaddr_t netaddr;
isc_netaddr_fromsockaddr(&netaddr, &entry->sockaddr);
isc_netaddr_format(&netaddr, addrbuf, sizeof addrbuf);
isc_netaddr_format(&netaddr, addrbuf, sizeof(addrbuf));
if (debug)
fprintf(f, ";\t%p: refcnt %u flags %08x \n",
......@@ -3048,11 +3048,11 @@ dns_adb_dumpfind(dns_adbfind_t *find, FILE *f) {
switch (sa->type.sa.sa_family) {
case AF_INET:
tmpp = inet_ntop(AF_INET, &sa->type.sin.sin_addr,
tmp, sizeof tmp);
tmp, sizeof(tmp));
break;
case AF_INET6:
tmpp = inet_ntop(AF_INET6, &sa->type.sin6.sin6_addr,
tmp, sizeof tmp);
tmp, sizeof(tmp));
break;
default:
tmpp = "UnkFamily";
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: byaddr.c,v 1.29 2001/06/04 19:32:57 tale Exp $ */
/* $Id: byaddr.c,v 1.30 2001/11/12 19:05:12 gson Exp $ */
#include <config.h>
......@@ -140,7 +140,7 @@ copy_ptr_targets(dns_byaddr_t *byaddr, dns_rdataset_t *rdataset) {
result = dns_rdata_tostruct(&rdata, &ptr, NULL);
if (result != ISC_R_SUCCESS)
return (result);
name = isc_mem_get(byaddr->mctx, sizeof *name);
name = isc_mem_get(byaddr->mctx, sizeof(*name));
if (name == NULL) {
dns_rdata_freestruct(&ptr);
return (ISC_R_NOMEMORY);
......@@ -149,7 +149,7 @@ copy_ptr_targets(dns_byaddr_t *byaddr, dns_rdataset_t *rdataset) {
result = dns_name_dup(&ptr.ptr, byaddr->mctx, name);
dns_rdata_freestruct(&ptr);
if (result != ISC_R_SUCCESS) {
isc_mem_put(byaddr->mctx, name, sizeof *name);
isc_mem_put(byaddr->mctx, name, sizeof(*name));
return (ISC_R_NOMEMORY);
}
ISC_LIST_APPEND(byaddr->event->names, name, link);
......@@ -201,7 +201,7 @@ bevent_destroy(isc_event_t *event) {
next_name = ISC_LIST_NEXT(name, link);
ISC_LIST_UNLINK(bevent->names, name, link);
dns_name_free(name, mctx);
isc_mem_put(mctx, name, sizeof *name);
isc_mem_put(mctx, name, sizeof(*name));
}
isc_mem_put(mctx, event, event->ev_size);
}
......@@ -215,18 +215,18 @@ dns_byaddr_create(isc_mem_t *mctx, isc_netaddr_t *address, dns_view_t *view,
dns_byaddr_t *byaddr;
isc_event_t *ievent;
byaddr = isc_mem_get(mctx, sizeof *byaddr);
byaddr = isc_mem_get(mctx, sizeof(*byaddr));
if (byaddr == NULL)
return (ISC_R_NOMEMORY);
byaddr->mctx = mctx;
byaddr->options = options;
byaddr->event = isc_mem_get(mctx, sizeof *byaddr->event);
byaddr->event = isc_mem_get(mctx, sizeof(*byaddr->event));
if (byaddr->event == NULL) {
result = ISC_R_NOMEMORY;
goto cleanup_byaddr;
}
ISC_EVENT_INIT(byaddr->event, sizeof *byaddr->event, 0, NULL,
ISC_EVENT_INIT(byaddr->event, sizeof(*byaddr->event), 0, NULL,
DNS_EVENT_BYADDRDONE, action, arg, byaddr,
bevent_destroy, mctx);
byaddr->event->result = ISC_R_FAILURE;
......@@ -272,7 +272,7 @@ dns_byaddr_create(isc_mem_t *mctx, isc_netaddr_t *address, dns_view_t *view,
isc_task_detach(&byaddr->task);
cleanup_byaddr:
isc_mem_put(mctx, byaddr, sizeof *byaddr);
isc_mem_put(mctx, byaddr, sizeof(*byaddr));
return (result);
}
......@@ -305,7 +305,7 @@ dns_byaddr_destroy(dns_byaddr_t **byaddrp) {
DESTROYLOCK(&byaddr->lock);
byaddr->magic = 0;
isc_mem_put(byaddr->mctx, byaddr, sizeof *byaddr);
isc_mem_put(byaddr->mctx, byaddr, sizeof(*byaddr));
*byaddrp = NULL;
}
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: cache.c,v 1.49 2001/10/23 01:21:44 marka Exp $ */
/* $Id: cache.c,v 1.50 2001/11/12 19:05:13 gson Exp $ */
#include <config.h>
......@@ -167,7 +167,7 @@ dns_cache_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
REQUIRE(*cachep == NULL);
REQUIRE(mctx != NULL);
cache = isc_mem_get(mctx, sizeof *cache);
cache = isc_mem_get(mctx, sizeof(*cache));
if (cache == NULL)
return (ISC_R_NOMEMORY);
......@@ -253,7 +253,7 @@ dns_cache_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
cleanup_lock:
DESTROYLOCK(&cache->lock);
cleanup_mem:
isc_mem_put(mctx, cache, sizeof *cache);
isc_mem_put(mctx, cache, sizeof(*cache));
isc_mem_detach(&mctx);
return (result);
}
......@@ -305,7 +305,7 @@ cache_free(dns_cache_t *cache) {
DESTROYLOCK(&cache->filelock);
cache->magic = 0;
mctx = cache->mctx;
isc_mem_put(cache->mctx, cache, sizeof *cache);
isc_mem_put(cache->mctx, cache, sizeof(*cache));
isc_mem_detach(&mctx);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dispatch.c,v 1.102 2001/09/20 16:48:20 gson Exp $ */
/* $Id: dispatch.c,v 1.103 2001/11/12 19:05:14 gson Exp $ */
#include <config.h>
......@@ -243,7 +243,7 @@ request_log(dns_dispatch_t *disp, dns_dispentry_t *resp,
va_end(ap);
if (VALID_RESPONSE(resp)) {
isc_sockaddr_format(&resp->host, peerbuf, sizeof peerbuf);
isc_sockaddr_format(&resp->host, peerbuf, sizeof(peerbuf));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DISPATCH,
DNS_LOGMODULE_DISPATCH, level,
"dispatch %p response %p %s: %s", disp, resp,
......@@ -266,7 +266,7 @@ reseed_lfsr(isc_lfsr_t *lfsr, void *arg)
REQUIRE(VALID_DISPATCHMGR(mgr));
if (mgr->entropy != NULL) {
result = isc_entropy_getdata(mgr->entropy, &val, sizeof val,
result = isc_entropy_getdata(mgr->entropy, &val, sizeof(val),
NULL, 0);
INSIST(result == ISC_R_SUCCESS);
lfsr->count = (val & 0x1f) + 32;
......@@ -1375,7 +1375,7 @@ dispatch_allocate(dns_dispatchmgr_t *mgr, unsigned int maxrequests,
ISC_LINK_INIT(disp, link);
disp->refcount = 1;
disp->recv_pending = 0;
memset(&disp->local, 0, sizeof disp->local);
memset(&disp->local, 0, sizeof(disp->local));
disp->shutting_down = 0;
disp->shutdown_out = 0;
disp->connected = 0;
......@@ -1986,7 +1986,7 @@ do_cancel(dns_dispatch_t *disp, dns_dispentry_t *resp) {
* Send the shutdown failsafe event to this resp.
*/
ev = disp->failsafe_ev;
ISC_EVENT_INIT(ev, sizeof (*ev), 0, NULL, DNS_EVENT_DISPATCH,
ISC_EVENT_INIT(ev, sizeof(*ev), 0, NULL, DNS_EVENT_DISPATCH,
resp->action, resp->arg, resp, NULL, NULL);
ev->result = disp->shutdown_why;
ev->buffer.base = NULL;
......@@ -2108,7 +2108,7 @@ dns_dispatchmgr_dump(dns_dispatchmgr_t *mgr) {
disp = ISC_LIST_HEAD(mgr->list);
while (disp != NULL) {
isc_sockaddr_format(&disp->local, foo, sizeof foo);
isc_sockaddr_format(&disp->local, foo, sizeof(foo));
printf("\tdispatch %p, addr %s\n", disp, foo);
disp = ISC_LIST_NEXT(disp, link);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: gen.c,v 1.65 2001/08/08 22:54:39 gson Exp $ */
/* $Id: gen.c,v 1.66 2001/11/12 19:05:15 gson Exp $ */
#include <config.h>
......@@ -326,7 +326,7 @@ void
add(int rdclass, const char *classname, int type, const char *typename,
const char *dirname)
{
struct tt *newtt = (struct tt *)malloc(sizeof *newtt);
struct tt *newtt = (struct tt *)malloc(sizeof(*newtt));
struct tt *tt, *oldtt;
struct cc *newcc;
struct cc *cc, *oldcc;
......@@ -375,7 +375,7 @@ add(int rdclass, const char *classname, int type, const char *typename,
if (rdclass == 0)
return;
newcc = (struct cc *)malloc(sizeof *newcc);
newcc = (struct cc *)malloc(sizeof(*newcc));
newcc->rdclass = rdclass;
strcpy(newcc->classname, classname);
cc = classes;
......@@ -400,8 +400,8 @@ add(int rdclass, const char *classname, int type, const char *typename,
void
sd(int rdclass, const char *classname, const char *dirname, char filetype) {
char buf[sizeof "0123456789_65535.h"];
char fmt[sizeof "%10[-0-9a-z]_%d.h"];
char buf[sizeof("0123456789_65535.h")];
char fmt[sizeof("%10[-0-9a-z]_%d.h")];
int type;
char typename[11];
isc_dir_t dir;
......@@ -806,7 +806,7 @@ main(int argc, char **argv) {
} else if (structs) {
if (prefix != NULL) {
if ((fd = fopen(prefix,"r")) != NULL) {
while (fgets(buf, sizeof buf, fd) != NULL)
while (fgets(buf, sizeof(buf), fd) != NULL)
fputs(buf, stdout);
fclose(fd);
}
......@@ -815,14 +815,14 @@ main(int argc, char **argv) {
sprintf(buf, "%s/%s_%d.h",
tt->dirname, tt->typename, tt->type);
if ((fd = fopen(buf,"r")) != NULL) {
while (fgets(buf, sizeof buf, fd) != NULL)
while (fgets(buf, sizeof(buf), fd) != NULL)
fputs(buf, stdout);
fclose(fd);
}
}
if (suffix != NULL) {
if ((fd = fopen(suffix,"r")) != NULL) {
while (fgets(buf, sizeof buf, fd) != NULL)
while (fgets(buf, sizeof(buf), fd) != NULL)
fputs(buf, stdout);
fclose(fd);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: keytable.c,v 1.26 2001/06/04 19:33:03 tale Exp $ */
/* $Id: keytable.c,v 1.27 2001/11/12 19:05:16 gson Exp $ */
#include <config.h>
......@@ -77,7 +77,7 @@ dns_keytable_create(isc_mem_t *mctx, dns_keytable_t **keytablep) {
REQUIRE(keytablep != NULL && *keytablep == NULL);
keytable = isc_mem_get(mctx, sizeof *keytable);
keytable = isc_mem_get(mctx, sizeof(*keytable));
if (keytable == NULL)
return (ISC_R_NOMEMORY);
......@@ -119,7 +119,7 @@ dns_keytable_create(isc_mem_t *mctx, dns_keytable_t **keytablep) {
dns_rbt_destroy(&keytable->table);
cleanup_keytable:
isc_mem_put(mctx, keytable, sizeof *keytable);
isc_mem_put(mctx, keytable, sizeof(*keytable));
return (result);
}
......@@ -175,7 +175,7 @@ dns_keytable_detach(dns_keytable_t **keytablep) {
isc_rwlock_destroy(&keytable->rwlock);
DESTROYLOCK(&keytable->lock);
keytable->magic = 0;
isc_mem_put(keytable->mctx, keytable, sizeof *keytable);
isc_mem_put(keytable->mctx, keytable, sizeof(*keytable));
}
*keytablep = NULL;
......@@ -197,7 +197,7 @@ dns_keytable_add(dns_keytable_t *keytable, dst_key_t **keyp) {
keyname = dst_key_name(*keyp);
knode = isc_mem_get(keytable->mctx, sizeof *knode);
knode = isc_mem_get(keytable->mctx, sizeof(*knode));
if (knode == NULL)
return (ISC_R_NOMEMORY);
......@@ -219,7 +219,7 @@ dns_keytable_add(dns_keytable_t *keytable, dst_key_t **keyp) {
RWUNLOCK(&keytable->rwlock, isc_rwlocktype_write);
if (knode != NULL)
isc_mem_put(keytable->mctx, knode, sizeof *knode);
isc_mem_put(keytable->mctx, knode, sizeof(*knode));
return (result);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lookup.c,v 1.9 2001/02/05 19:47:03 bwelling Exp $ */
/* $Id: lookup.c,v 1.10 2001/11/12 19:05:17 gson Exp $ */
#include <config.h>
......@@ -385,14 +385,14 @@ dns_lookup_create(isc_mem_t *mctx, dns_name_t *name, dns_rdatatype_t type,
dns_lookup_t *lookup;
isc_event_t *ievent;
lookup = isc_mem_get(mctx, sizeof *lookup);
lookup = isc_mem_get(mctx, sizeof(*lookup));
if (lookup == NULL)
return (ISC_R_NOMEMORY);
lookup->mctx = mctx;
lookup->options = options;
ievent = isc_event_allocate(mctx, lookup, DNS_EVENT_LOOKUPDONE,
action, arg, sizeof *lookup->event);
action, arg, sizeof(*lookup->event));
if (ievent == NULL) {
result = ISC_R_NOMEMORY;
goto cleanup_lookup;
......@@ -447,7 +447,7 @@ dns_lookup_create(isc_mem_t *mctx, dns_name_t *name, dns_rdatatype_t type,
isc_task_detach(&lookup->task);
cleanup_lookup:
isc_mem_put(mctx, lookup, sizeof *lookup);
isc_mem_put(mctx, lookup, sizeof(*lookup));
return (result);
}
......@@ -486,7 +486,7 @@ dns_lookup_destroy(dns_lookup_t **lookupp) {
DESTROYLOCK(&lookup->lock);
lookup->magic = 0;
isc_mem_put(lookup->mctx, lookup, sizeof *lookup);
isc_mem_put(lookup->mctx, lookup, sizeof(*lookup));
*lookupp = NULL;
}
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.127 2001/09/30 04:31:26 marka Exp $ */
/* $Id: master.c,v 1.128 2001/11/12 19:05:20 gson Exp $ */
#include <config.h>
......@@ -351,7 +351,7 @@ incctx_destroy(isc_mem_t *mctx, dns_incctx_t *ictx) {
parent = ictx->parent;
ictx->parent = NULL;
isc_mem_put(mctx, ictx, sizeof *ictx);
isc_mem_put(mctx, ictx, sizeof(*ictx));
if (parent != NULL) {
ictx = parent;
......@@ -389,7 +389,7 @@ incctx_create(isc_mem_t *mctx, dns_name_t *origin, dns_incctx_t **ictxp) {
isc_region_t r;
int i;
ictx = isc_mem_get(mctx, sizeof *ictx);
ictx = isc_mem_get(mctx, sizeof(*ictx));
if (ictx == NULL)
return (ISC_R_NOMEMORY);
......@@ -445,7 +445,7 @@ loadctx_create(isc_mem_t *mctx, unsigned int options, dns_name_t *top,
return (ISC_R_NOMEMORY);
result = isc_mutex_init(&lctx->lock);
if (result != ISC_R_SUCCESS) {
isc_mem_put(mctx, lctx, sizeof *lctx);
isc_mem_put(mctx, lctx, sizeof(*lctx));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_mutex_init() failed: %s",
isc_result_totext(result));
......@@ -461,7 +461,7 @@ loadctx_create(isc_mem_t *mctx, unsigned int options, dns_name_t *top,
result = isc_lex_create(mctx, TOKENSIZ, &lctx->lex);
if (result != ISC_R_SUCCESS)
goto cleanup_inc;
memset(specials, 0, sizeof specials);
memset(specials, 0, sizeof(specials));
specials['('] = 1;
specials[')'] = 1;
specials['"'] = 1;
......@@ -1609,9 +1609,9 @@ load(dns_loadctx_t *lctx) {
ISC_LIST_UNLINK(glue_list, this, link);
if (rdatalist != NULL)
isc_mem_put(mctx, rdatalist,
rdatalist_size * sizeof *rdatalist);
rdatalist_size * sizeof(*rdatalist));
if (rdata != NULL)
isc_mem_put(mctx, rdata, rdata_size * sizeof *rdata);
isc_mem_put(mctx, rdata, rdata_size * sizeof(*rdata));
if (target_mem != NULL)
isc_mem_put(mctx, target_mem, target_size);
if (include_file != NULL)
......@@ -1877,7 +1877,7 @@ grow_rdatalist(int new_len, dns_rdatalist_t *old, int old_len,
ISC_LIST(dns_rdatalist_t) save;
dns_rdatalist_t *this;
new = isc_mem_get(mctx, new_len * sizeof *new);
new = isc_mem_get(mctx, new_len * sizeof(*new));
if (new == NULL)
return (NULL);
......@@ -1909,7 +1909,7 @@ grow_rdatalist(int new_len, dns_rdatalist_t *old, int old_len,
INSIST(rdlcount == old_len);
if (old != NULL)
isc_mem_put(mctx, old, old_len * sizeof *old);
isc_mem_put(mctx, old, old_len * sizeof(*old));
return (new);
}
......@@ -1928,10 +1928,10 @@ grow_rdata(int new_len, dns_rdata_t *old, int old_len,
dns_rdatalist_t *this;
dns_rdata_t *rdata;
new = isc_mem_get(mctx, new_len * sizeof *new);
new = isc_mem_get(mctx, new_len * sizeof(*new));
if (new == NULL)
return (NULL);
memset(new, 0, new_len * sizeof *new);
memset(new, 0, new_len * sizeof(*new));
/*
* Copy current relinking.
......@@ -1972,7 +1972,7 @@ grow_rdata(int new_len, dns_rdata_t *old, int old_len,
}
INSIST(rdcount == old_len);
if (old != NULL)
isc_mem_put(mctx, old, old_len * sizeof *old);
isc_mem_put(mctx, old, old_len * sizeof(*old));
return (new);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: masterdump.c,v 1.61 2001/10/25 23:18:05 gson Exp $ */
/* $Id: masterdump.c,v 1.62 2001/11/12 19:05:21 gson Exp $ */
#include <config.h>
......@@ -424,7 +424,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
INDENT_TO(ttl_column);
length = sprintf(ttlbuf, "%u", rdataset->ttl);
INSIST(length <= sizeof ttlbuf);
INSIST(length <= sizeof(ttlbuf));
isc_buffer_availableregion(target, &r);
if (r.length < length)
return (ISC_R_NOSPACE);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.c,v 1.195 2001/10/01 18:54:01 gson Exp $ */
/* $Id: message.c,v 1.196 2001/11/12 19:05:22 gson Exp $ */
/***
*** Imports
......@@ -2941,7 +2941,7 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
isc_result_t
dns_message_totext(dns_message_t *msg, const dns_master_style_t *style,
dns_messagetextflag_t flags, isc_buffer_t *target) {
char buf[sizeof "1234567890"];
char buf[sizeof("1234567890")];
isc_result_t result;
REQUIRE(DNS_MESSAGE_VALID(msg));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: name.c,v 1.127 2001/06/28 21:34:11 gson Exp $ */
/* $Id: name.c,v 1.128 2001/11/12 19:05:24 gson Exp $ */
#include <config.h>
......@@ -2174,7 +2174,7 @@ compact(dns_name_t *name, unsigned char *offsets) {
*/
again:
memset(tail, 0, sizeof tail);
memset(tail, 0, sizeof(tail));
INSIST(name->labels != 0);
n = name->labels - 1;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: peer.c,v 1.15 2001/11/09 04:21:55 marka Exp $ */
/* $Id: peer.c,v 1.16 2001/11/12 19:05:26 gson Exp $ */
#include <config.h>
......@@ -50,7 +50,7 @@ dns_peerlist_new(isc_mem_t *mem, dns_peerlist_t **list) {
REQUIRE(list != NULL);
l = isc_mem_get(mem, sizeof *l);
l = isc_mem_get(mem, sizeof(*l));
if (l == NULL) {
return (ISC_R_NOMEMORY);
}
......@@ -125,7 +125,7 @@ dns_peerlist_delete(dns_peerlist_t **list) {
}
l->magic = 0;
isc_mem_put(l->mem, l, sizeof *l);
isc_mem_put(l->mem, l, sizeof(*l));
*list = NULL;
......@@ -189,7 +189,7 @@ dns_peer_new(isc_mem_t *mem, isc_netaddr_t *addr, dns_peer_t **peerptr) {
REQUIRE(peerptr != NULL);
peer = isc_mem_get(mem, sizeof *peer);
peer = isc_mem_get(mem, sizeof(*peer));
if (peer == NULL) {
return (ISC_R_NOMEMORY);
}
......@@ -205,7 +205,7 @@ dns_peer_new(isc_mem_t *mem, isc_netaddr_t *addr, dns_peer_t **peerptr) {
peer->key = NULL;
peer->refs = 1;
memset(&peer->bitflags, 0x0, sizeof peer->bitflags);
memset(&peer->bitflags, 0x0, sizeof(peer->bitflags));
ISC_LINK_INIT(peer, next);
......@@ -272,7 +272,7 @@ dns_peer_delete(dns_peer_t **peer) {
isc_mem_put(mem, p->key, sizeof(dns_name_t));
}
isc_mem_put(mem, p, sizeof *p);
isc_mem_put(mem, p, sizeof(*p));
*peer = NULL;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rbtdb.c,v 1.171 2001/10/27 00:27:54 gson Exp $ */
/* $Id: rbtdb.c,v 1.172 2001/11/12 19:05:27 gson Exp $ */
/*
* Principal Author: Bob Halley
......@@ -367,7 +367,7 @@ free_rbtdb(dns_rbtdb_t *rbtdb) {
if (rbtdb->current_version != NULL)
isc_mem_put(rbtdb->common.mctx, rbtdb->current_version,
sizeof (rbtdb_version_t));
sizeof(rbtdb_version_t));
if (dns_name_dynamic(&rbtdb->common.origin))
dns_name_free(&rbtdb->common.origin, rbtdb->common.mctx);
if (rbtdb->tree != NULL)
......@@ -375,7 +375,7 @@ free_rbtdb(dns_rbtdb_t *rbtdb) {
for (i = 0; i < rbtdb->node_lock_count; i++)
DESTROYLOCK(&rbtdb->node_locks[i].lock);
isc_mem_put(rbtdb->common.mctx, rbtdb->node_locks,
rbtdb->node_lock_count * sizeof (rbtdb_nodelock_t));
rbtdb->node_lock_count * sizeof(rbtdb_nodelock_t));
isc_rwlock_destroy(&rbtdb->tree_lock);
isc_refcount_destroy(&rbtdb->references);