From 6f88dd3240841fd2d49aafd337155beea62a8488 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 23 Mar 2010 17:09:17 +0000 Subject: [PATCH] [XDK] Improve BYTES_TO_PAGES macro svn path=/branches/header-work/; revision=46360 --- include/xdk/mmfuncs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xdk/mmfuncs.h b/include/xdk/mmfuncs.h index c405bb29844..b714f97845a 100644 --- a/include/xdk/mmfuncs.h +++ b/include/xdk/mmfuncs.h @@ -55,7 +55,7 @@ $if (_WDMDDK_) * IN ULONG Size) */ #define BYTES_TO_PAGES(Size) \ - (((Size) >> PAGE_SHIFT) + (((Size) & (PAGE_SIZE - 1)) != 0)) + (((Size) + PAGE_SIZE - 1) >> PAGE_SHIFT) /* PVOID * PAGE_ALIGN(