diff --git a/reactos/ntoskrnl/io/plugplay.c b/reactos/ntoskrnl/io/plugplay.c index 810a6d597fa..4160efd6d2a 100644 --- a/reactos/ntoskrnl/io/plugplay.c +++ b/reactos/ntoskrnl/io/plugplay.c @@ -5,7 +5,7 @@ * FILE: ntoskrnl/io/plugplay.c * PURPOSE: Plug-and-play interface routines * - * PROGRAMMERS: David Welch (welch@mcmail.com) + * PROGRAMMERS: Eric Kohl */ /* INCLUDES *****************************************************************/ @@ -146,7 +146,9 @@ NtGetPlugPlayEvent(IN ULONG Reserved1, } /* Get entry from the tail of the queue */ - Entry = (PPNP_EVENT_ENTRY)IopPnpEventQueueHead.Blink; + Entry = CONTAINING_RECORD(IopPnpEventQueueHead.Blink, + PNP_EVENT_ENTRY, + ListEntry); /* Check the buffer size */ if (BufferLength < Entry->Event.TotalSize)