Author: pschweitzer
Date: Mon May 25 17:30:01 2015
New Revision: 67911
URL:
http://svn.reactos.org/svn/reactos?rev=67911&view=rev
Log:
[FASTFAT]
[NTFS]
Remove useless cast and use appropriate macro.
Spotted by Thomas
Modified:
trunk/reactos/drivers/filesystems/fastfat/cleanup.c
trunk/reactos/drivers/filesystems/fastfat/dir.c
trunk/reactos/drivers/filesystems/fastfat/finfo.c
trunk/reactos/drivers/filesystems/fastfat/rw.c
trunk/reactos/drivers/filesystems/fastfat/volume.c
trunk/reactos/drivers/filesystems/ntfs/finfo.c
Modified: trunk/reactos/drivers/filesystems/fastfat/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] Mon May 25 17:30:01
2015
@@ -47,12 +47,12 @@
else
{
if(!ExAcquireResourceExclusiveLite(&pFcb->MainResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
return STATUS_PENDING;
}
if(!ExAcquireResourceExclusiveLite(&pFcb->PagingIoResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
ExReleaseResourceLite(&pFcb->MainResource);
return STATUS_PENDING;
@@ -157,7 +157,7 @@
}
if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
return VfatMarkIrpContextForQueue(IrpContext);
}
Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] Mon May 25 17:30:01 2015
@@ -422,7 +422,7 @@
Buffer = VfatGetUserBuffer(IrpContext->Irp, FALSE);
if (!ExAcquireResourceSharedLite(&pFcb->MainResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
Status = VfatLockUserBuffer(IrpContext->Irp, BufferLength, IoWriteAccess);
if (NT_SUCCESS(Status))
@@ -505,7 +505,7 @@
DirContext.ShortNameU.MaximumLength = sizeof(ShortNameBuffer);
if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
ExReleaseResourceLite(&pFcb->MainResource);
return VfatMarkIrpContextForQueue(IrpContext);
Modified: trunk/reactos/drivers/filesystems/fastfat/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/finfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/finfo.c [iso-8859-1] Mon May 25 17:30:01
2015
@@ -1377,7 +1377,7 @@
if (!(FCB->Flags & FCB_IS_PAGE_FILE))
{
if (!ExAcquireResourceSharedLite(&FCB->MainResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
return VfatMarkIrpContextForQueue(IrpContext);
}
@@ -1514,7 +1514,7 @@
if (FileInformationClass == FileRenameInformation)
{
if
(!ExAcquireResourceExclusiveLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
return VfatMarkIrpContextForQueue(IrpContext);
}
@@ -1523,7 +1523,7 @@
if (!(FCB->Flags & FCB_IS_PAGE_FILE))
{
if (!ExAcquireResourceExclusiveLite(&FCB->MainResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
if (FileInformationClass == FileRenameInformation)
{
Modified: trunk/reactos/drivers/filesystems/fastfat/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] Mon May 25 17:30:01 2015
@@ -887,7 +887,7 @@
if (Fcb->Flags & FCB_IS_PAGE_FILE)
{
if (!ExAcquireResourceSharedLite(Resource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
Resource = NULL;
Status = STATUS_PENDING;
@@ -897,7 +897,7 @@
else
{
if (!ExAcquireResourceExclusiveLite(Resource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
Resource = NULL;
Status = STATUS_PENDING;
Modified: trunk/reactos/drivers/filesystems/fastfat/volume.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] Mon May 25 17:30:01
2015
@@ -361,7 +361,7 @@
DPRINT("VfatQueryVolumeInformation(IrpContext %p)\n", IrpContext);
if
(!ExAcquireResourceSharedLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
DPRINT1("DirResource failed!\n");
return VfatMarkIrpContextForQueue(IrpContext);
@@ -436,7 +436,7 @@
DPRINT("VfatSetVolumeInformation(IrpContext %p)\n", IrpContext);
if
(!ExAcquireResourceExclusiveLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
return VfatMarkIrpContextForQueue(IrpContext);
}
Modified: trunk/reactos/drivers/filesystems/ntfs/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] Mon May 25 17:30:01 2015
@@ -247,7 +247,7 @@
BufferLength = Stack->Parameters.QueryFile.Length;
if (!ExAcquireResourceSharedLite(&Fcb->MainResource,
- (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
{
return NtfsMarkIrpContextForQueue(IrpContext);
}