From 92a177947370e0134602164b8da8b158806612a5 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 5 Feb 2005 08:43:52 +0000 Subject: [PATCH] Use CONTAINING_RECORD macro instead of type cast, fix the copyright header. svn path=/trunk/; revision=13417 --- reactos/ntoskrnl/io/plugplay.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)