Author: sginsberg
Date: Sun Dec 14 04:15:49 2008
New Revision: 38075
URL:
http://svn.reactos.org/svn/reactos?rev=38075&view=rev
Log:
- Fix a broken loop
- Remove unnecessary checks
- Fixes CID 171, 172 and 655
Modified:
trunk/reactos/drivers/storage/scsiport/scsiport.c
Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/scsiport/s…
==============================================================================
--- trunk/reactos/drivers/storage/scsiport/scsiport.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/scsiport/scsiport.c [iso-8859-1] Sun Dec 14 04:15:49
2008
@@ -1733,7 +1733,7 @@
LunInfo = DeviceExtension->BusesConfig->BusScanInfo[Bus]->LunInfo;
- while (!LunInfo)
+ while (LunInfo)
{
/* Free current, but save pointer to the next one */
Ptr = LunInfo->Next;
@@ -1958,8 +1958,8 @@
Lun);
/* This request should not be processed if */
- if ((LunExtension && LunExtension->ReadyLun) ||
- (LunExtension && LunExtension->SrbInfo.Srb))
+ if ((LunExtension->ReadyLun) ||
+ (LunExtension->SrbInfo.Srb))
{
/* Nothing to do here */
break;
@@ -2900,7 +2900,7 @@
// Store the MDL virtual address in SrbInfo structure
SrbInfo->DataOffset = MmGetMdlVirtualAddress(Irp->MdlAddress);
- if (DeviceExtension->MapBuffers && Irp->MdlAddress)
+ if (DeviceExtension->MapBuffers)
{
/* Calculate offset within DataBuffer */
SrbInfo->DataOffset = MmGetSystemAddressForMdl(Irp->MdlAddress);