diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-03-22 12:20:19 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-03-22 12:20:19 +1030 |
commit | 414da16fc2996a74f19f47ab7379ca61a723b425 (patch) | |
tree | 7d69a8a6726e836e1450ac33b06ffe4caa55e8a3 | |
parent | 086a4e1915a8307c08320900df0099842a894135 (diff) |
alloc: avoid arithmetic on void pointers.
-rw-r--r-- | ccan/alloc/alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ccan/alloc/alloc.c b/ccan/alloc/alloc.c index e9aaf3dd..4b3c03ce 100644 --- a/ccan/alloc/alloc.c +++ b/ccan/alloc/alloc.c @@ -422,7 +422,8 @@ static void del_large_from_small_free_list(struct header *head, for (i = 0; i < SMALL_PAGES_PER_LARGE_PAGE; i++) { del_from_list(head, &head->small_free_list, - (void *)ph + (i << sp_bits), + (struct page_header *)((char *)ph + + (i << sp_bits)), sp_bits); } } |