mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
sizeof style
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mem.c,v 1.107 2001/11/27 00:56:14 gson Exp $ */
|
||||
/* $Id: mem.c,v 1.108 2001/11/27 01:56:03 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -349,7 +349,7 @@ more_basic_blocks(isc_mem_t *ctx) {
|
||||
if (ctx->basic_table_count == ctx->basic_table_size) {
|
||||
table_size = ctx->basic_table_size + TABLE_INCREMENT;
|
||||
table = (ctx->memalloc)(ctx->arg,
|
||||
table_size * sizeof (unsigned char *));
|
||||
table_size * sizeof(unsigned char *));
|
||||
if (table == NULL) {
|
||||
ctx->memalloc_failures++;
|
||||
return (ISC_FALSE);
|
||||
@@ -357,7 +357,7 @@ more_basic_blocks(isc_mem_t *ctx) {
|
||||
if (ctx->basic_table_size != 0) {
|
||||
memcpy(table, ctx->basic_table,
|
||||
ctx->basic_table_size *
|
||||
sizeof (unsigned char *));
|
||||
sizeof(unsigned char *));
|
||||
(ctx->memfree)(ctx->arg, ctx->basic_table);
|
||||
}
|
||||
ctx->basic_table = table;
|
||||
@@ -706,7 +706,7 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
|
||||
UNUSED(target_size);
|
||||
#endif
|
||||
|
||||
ctx = (memalloc)(arg, sizeof *ctx);
|
||||
ctx = (memalloc)(arg, sizeof(*ctx));
|
||||
if (ctx == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
@@ -741,25 +741,25 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
|
||||
#endif /* ISC_MEM_USE_INTERNAL_MALLOC */
|
||||
|
||||
ctx->stats = (memalloc)(arg,
|
||||
(ctx->max_size+1) * sizeof (struct stats));
|
||||
(ctx->max_size+1) * sizeof(struct stats));
|
||||
if (ctx->stats == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto error;
|
||||
}
|
||||
memset(ctx->stats, 0, (ctx->max_size + 1) * sizeof (struct stats));
|
||||
memset(ctx->stats, 0, (ctx->max_size + 1) * sizeof(struct stats));
|
||||
|
||||
#if ISC_MEM_USE_INTERNAL_MALLOC
|
||||
if (target_size == 0)
|
||||
ctx->mem_target = DEF_MEM_TARGET;
|
||||
else
|
||||
ctx->mem_target = target_size;
|
||||
ctx->freelists = (memalloc)(arg, ctx->max_size * sizeof (element *));
|
||||
ctx->freelists = (memalloc)(arg, ctx->max_size * sizeof(element *));
|
||||
if (ctx->freelists == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto error;
|
||||
}
|
||||
memset(ctx->freelists, 0,
|
||||
ctx->max_size * sizeof (element *));
|
||||
ctx->max_size * sizeof(element *));
|
||||
ctx->basic_blocks = NULL;
|
||||
ctx->basic_table = NULL;
|
||||
ctx->basic_table_count = 0;
|
||||
@@ -782,7 +782,7 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
|
||||
unsigned int i;
|
||||
|
||||
ctx->debuglist = (memalloc)(arg,
|
||||
(ctx->max_size+1) * sizeof (debuglist_t));
|
||||
(ctx->max_size+1) * sizeof(debuglist_t));
|
||||
if (ctx->debuglist == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user