Commit 88c6f95b authored by marko's avatar marko

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.
parent be083247
......@@ -447,7 +447,8 @@ buf_buddy_free_low(
}
/* 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
{
......
......@@ -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)))
/**************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment