Browse Source

alloc: avoid arithmetic on void pointers.

Rusty Russell 15 years ago
parent
commit
414da16fc2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ccan/alloc/alloc.c

+ 2 - 1
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);
 	}
 }