update for HEAD-2003091401
[reactos.git] / drivers / fs / vfat / dir.c
index 362fde8..35a7479 100644 (file)
@@ -207,21 +207,24 @@ NTSTATUS DoQuery (PVFAT_IRP_CONTEXT IrpContext)
   VFATFCB tmpFcb;
   PVFATCCB pCcb;
   BOOLEAN First = FALSE;
+  
+  PEXTENDED_IO_STACK_LOCATION Stack = (PEXTENDED_IO_STACK_LOCATION) IrpContext->Stack;
 
   pCcb = (PVFATCCB) IrpContext->FileObject->FsContext2;
   pFcb = (PVFATFCB) IrpContext->FileObject->FsContext;
 
-  if (!ExAcquireResourceSharedLite(&pFcb->MainResource, IrpContext->Flags & IRPCONTEXT_CANWAIT))
+  if (!ExAcquireResourceSharedLite(&pFcb->MainResource,
+                                   (BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
   {
      return STATUS_PENDING;
   }
 
   // Obtain the callers parameters
-  BufferLength = IrpContext->Stack->Parameters.QueryDirectory.Length;
-  pSearchPattern = IrpContext->Stack->Parameters.QueryDirectory.FileName;
+  BufferLength = Stack->Parameters.QueryDirectory.Length;
+  pSearchPattern = Stack->Parameters.QueryDirectory.FileName;
   FileInformationClass =
-    IrpContext->Stack->Parameters.QueryDirectory.FileInformationClass;
-  FileIndex = IrpContext->Stack->Parameters.QueryDirectory.FileIndex;
+    Stack->Parameters.QueryDirectory.FileInformationClass;
+  FileIndex = Stack->Parameters.QueryDirectory.FileIndex;
   if (pSearchPattern)
   {
     if (!pCcb->DirectorySearchPattern)