From f316fb9a63f28aa33d22a56f1a6179094dd55e25 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 1 Feb 2000 00:18:35 +0000 Subject: [PATCH] needless use of void pointers made debugging hard --- lib/isc/mem.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 29da706215..6697f9501f 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -69,9 +69,11 @@ * Types. */ -typedef struct { - void * next; -} element; +typedef struct element element; + +struct element { + element * next; +}; typedef struct { /* @@ -355,7 +357,7 @@ more_basic_blocks(isc_mem_t *ctx) { curr = new; next = curr + ctx->mem_target; for (i = 0; i < (NUM_BASIC_BLOCKS - 1); i++) { - ((element *)curr)->next = next; + ((element *)curr)->next = (element *)next; curr = next; next += ctx->mem_target; } @@ -443,7 +445,7 @@ mem_getunlocked(isc_mem_t *ctx, size_t size) curr = new; next = curr + new_size; for (i = 0; i < (frags - 1); i++) { - ((element *)curr)->next = next; + ((element *)curr)->next = (element *)next; curr = next; next += new_size; }