branches/zip: buf_buddy_free_low(): Use a byte pointer in arithmetics.

buf_buddy_get(): Document that "page" should be a pointer to char or byte.
This commit is contained in:
marko 2006-12-18 12:39:39 +00:00
parent be0832471b
commit 88c6f95b59
2 changed files with 4 additions and 2 deletions

View file

@ -447,7 +447,8 @@ buddy_free:
}
/* Try to relocate the buddy of the free block to buf. */
buddy = buf_buddy_get(bpage, BUF_BUDDY_LOW << i);
buddy = (buf_page_t*) buf_buddy_get(((byte*) bpage),
BUF_BUDDY_LOW << i);
#ifdef UNIV_DEBUG
{

View file

@ -29,7 +29,8 @@ buf_buddy_get_offset(
__attribute__((nonnull));
/**************************************************************************
Get the buddy of a compressed page frame. */
Get the buddy of a compressed page frame.
Note: "page" should be a pointer to byte or char. */
#define buf_buddy_get(page,size) ((page) + buf_buddy_get_offset((page),(size)))
/**************************************************************************