Author: gschneider
Date: Fri Dec 11 17:09:01 2009
New Revision: 44539
URL:
http://svn.reactos.org/svn/reactos?rev=44539&view=rev
Log:
[videoprt] Split complicated asserts for easier problem understanding as seen in bug
#4354
Modified:
trunk/reactos/drivers/video/videoprt/agp.c
trunk/reactos/drivers/video/videoprt/dispatch.c
trunk/reactos/drivers/video/videoprt/resource.c
Modified: trunk/reactos/drivers/video/videoprt/agp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/agp…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/agp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/agp.c [iso-8859-1] Fri Dec 11 17:09:01 2009
@@ -507,10 +507,16 @@
AgpBusInterface = &DeviceExtension->AgpInterface;
AgpInterface = (PVIDEO_PORT_AGP_INTERFACE_2)Interface;
- ASSERT((Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2 &&
- Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) ||
- (Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_1 &&
- Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE)));
+ ASSERT(Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2 ||
+ Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_1);
+ if (Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2)
+ {
+ ASSERT(Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2));
+ }
+ else if (Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_1)
+ {
+ ASSERT(Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE));
+ }
if (DeviceExtension->NextDeviceObject == NULL)
{
Modified: trunk/reactos/drivers/video/videoprt/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/dis…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/dispatch.c [iso-8859-1] Fri Dec 11 17:09:01 2009
@@ -361,10 +361,10 @@
FullList->InterfaceType, FullList->BusNumber,
DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version,
FullList->PartialResourceList.Revision);
/* FIXME: Is this ASSERT ok for resources from the PNP manager? */
- ASSERT(FullList->InterfaceType == PCIBus &&
- FullList->BusNumber == DeviceExtension->SystemIoBusNumber
&&
- 1 == FullList->PartialResourceList.Version &&
- 1 == FullList->PartialResourceList.Revision);
+ ASSERT(FullList->InterfaceType == PCIBus);
+ ASSERT(FullList->BusNumber == DeviceExtension->SystemIoBusNumber);
+ ASSERT(1 == FullList->PartialResourceList.Version);
+ ASSERT(1 == FullList->PartialResourceList.Revision);
for (Descriptor = FullList->PartialResourceList.PartialDescriptors;
Descriptor < FullList->PartialResourceList.PartialDescriptors +
FullList->PartialResourceList.Count;
Descriptor++)
Modified: trunk/reactos/drivers/video/videoprt/resource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/res…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/resource.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/resource.c [iso-8859-1] Fri Dec 11 17:09:01 2009
@@ -522,10 +522,10 @@
INFO_(VIDEOPRT, "InterfaceType %u BusNumber List %u Device BusNumber %u
Version %u Revision %u\n",
FullList->InterfaceType, FullList->BusNumber,
DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version,
FullList->PartialResourceList.Revision);
- ASSERT(FullList->InterfaceType == PCIBus &&
- FullList->BusNumber == DeviceExtension->SystemIoBusNumber
&&
- 1 == FullList->PartialResourceList.Version &&
- 1 == FullList->PartialResourceList.Revision);
+ ASSERT(FullList->InterfaceType == PCIBus);
+ ASSERT(FullList->BusNumber == DeviceExtension->SystemIoBusNumber);
+ ASSERT(1 == FullList->PartialResourceList.Version);
+ ASSERT(1 == FullList->PartialResourceList.Revision);
for (Descriptor = FullList->PartialResourceList.PartialDescriptors;
Descriptor < FullList->PartialResourceList.PartialDescriptors +
FullList->PartialResourceList.Count;
Descriptor++)