mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
needless use of void pointers made debugging hard
This commit is contained in:
@@ -69,9 +69,11 @@
|
|||||||
* Types.
|
* Types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct element element;
|
||||||
void * next;
|
|
||||||
} element;
|
struct element {
|
||||||
|
element * next;
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/*
|
/*
|
||||||
@@ -355,7 +357,7 @@ more_basic_blocks(isc_mem_t *ctx) {
|
|||||||
curr = new;
|
curr = new;
|
||||||
next = curr + ctx->mem_target;
|
next = curr + ctx->mem_target;
|
||||||
for (i = 0; i < (NUM_BASIC_BLOCKS - 1); i++) {
|
for (i = 0; i < (NUM_BASIC_BLOCKS - 1); i++) {
|
||||||
((element *)curr)->next = next;
|
((element *)curr)->next = (element *)next;
|
||||||
curr = next;
|
curr = next;
|
||||||
next += ctx->mem_target;
|
next += ctx->mem_target;
|
||||||
}
|
}
|
||||||
@@ -443,7 +445,7 @@ mem_getunlocked(isc_mem_t *ctx, size_t size)
|
|||||||
curr = new;
|
curr = new;
|
||||||
next = curr + new_size;
|
next = curr + new_size;
|
||||||
for (i = 0; i < (frags - 1); i++) {
|
for (i = 0; i < (frags - 1); i++) {
|
||||||
((element *)curr)->next = next;
|
((element *)curr)->next = (element *)next;
|
||||||
curr = next;
|
curr = next;
|
||||||
next += new_size;
|
next += new_size;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user