From 87e42d059af73a636c56dc7f1f959c6e9392d05d Mon Sep 17 00:00:00 2001 From: marko <> Date: Sun, 6 May 2007 12:30:10 +0000 Subject: [PATCH] branches/zip: buf_page_io_query(): Shorten the code by using a local variable. --- include/buf0buf.ic | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/buf0buf.ic b/include/buf0buf.ic index bbc44774c7c..17e6476704e 100644 --- a/include/buf0buf.ic +++ b/include/buf0buf.ic @@ -748,20 +748,17 @@ buf_page_io_query( /* out: TRUE if io going on */ buf_page_t* bpage) /* in: buf_pool block, must be bufferfixed */ { + ibool io_fixed; + mutex_enter(&(buf_pool->mutex)); ut_ad(buf_page_in_file(bpage)); ut_ad(bpage->buf_fix_count > 0); - if (buf_page_get_io_fix(bpage) != BUF_IO_NONE) { - mutex_exit(&(buf_pool->mutex)); - - return(TRUE); - } - + io_fixed = buf_page_get_io_fix(bpage) != BUF_IO_NONE; mutex_exit(&(buf_pool->mutex)); - return(FALSE); + return(io_fixed); } /************************************************************************