Commit 7a1d5d91 authored by marko's avatar marko

branches/zip: Fix a bug that was introduced in r2123.

buf_block_is_uncompressed(): Check that the pointer is aligned.  Use the
C modulus operator % instead of ut_align_offset(), because sizeof(buf_block_t)
is not guaranteed to be a power of 2.
parent 0ef4026b
......@@ -1671,7 +1671,7 @@ buf_block_is_uncompressed(
ut_ad(mutex_own(&buf_pool->mutex));
if (UNIV_UNLIKELY(ut_align_offset(block, sizeof *block) != 0)) {
if (UNIV_UNLIKELY((((ulint) block) % sizeof *block) != 0)) {
/* The pointer should be aligned. */
return(FALSE);
}
......
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