https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e50873376d9139496203e…
commit e50873376d9139496203ea2b890c26a186ecbed3
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Thu Jan 4 18:29:24 2018 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Aug 15 18:04:57 2019 +0200
[NTOS:IO] Improve an alignment
---
ntoskrnl/io/iomgr/device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/io/iomgr/device.c b/ntoskrnl/io/iomgr/device.c
index 3810dd587c4..56a4bd7e3ed 100644
--- a/ntoskrnl/io/iomgr/device.c
+++ b/ntoskrnl/io/iomgr/device.c
@@ -1084,7 +1084,8 @@ IoCreateDevice(IN PDRIVER_OBJECT DriverObject,
if (DeviceName) ObjectAttributes.Attributes |= OBJ_PERMANENT;
/* Align the Extension Size to 8-bytes */
- AlignedDeviceExtensionSize = (DeviceExtensionSize + 7) &~ 7;
+ AlignedDeviceExtensionSize = ALIGN_UP_BY(DeviceExtensionSize,
+ MEMORY_ALLOCATION_ALIGNMENT);
/* Total Size */
TotalSize = AlignedDeviceExtensionSize +