- Slight code cleanup

- Add missing PAGED_CODE (thanks thomas)

svn path=/trunk/; revision=71863
This commit is contained in:
Ged Murphy 2016-07-08 13:41:31 +00:00
parent 7a8d83b7ea
commit 442231df6f
2 changed files with 5 additions and 2 deletions

View file

@ -1352,8 +1352,8 @@ IoGetRelatedDeviceObject(IN PFILE_OBJECT FileObject)
PFILE_OBJECT_EXTENSION FileObjectExtension;
ASSERT(FALSE);
/* The extension buffer comes directly after the file object */
FileObjectExtension = (PFILE_OBJECT_EXTENSION)(FileObject + 1);
/* Cast the buffer to something we understand */
FileObjectExtension = FileObject->FileObjectExtension;
/* Check if have a replacement top level device */
if (FileObjectExtension->TopDeviceObjectHint)

View file

@ -818,6 +818,7 @@ IopParseDevice(IN PVOID ParseObject,
FileObject->Flags |= FO_FILE_OBJECT_HAS_EXTENSION;
FileObjectExtension = (PFILE_OBJECT_EXTENSION)(FileObject + 1);
FileObject->FileObjectExtension = FileObjectExtension;
/* Add the top level device which we'll send the request to */
if (OpenPacket->InternalFlags & IOP_USE_TOP_LEVEL_DEVICE_HINT)
@ -2669,6 +2670,8 @@ IoCreateFileSpecifyDeviceObjectHint(OUT PHANDLE FileHandle,
{
ULONG Flags = 0;
PAGED_CODE();
/* Check if we were passed a device to send the create request to*/
if (DeviceObject)
{