Author: cgutman
Date: Mon Oct 20 15:32:53 2008
New Revision: 36858
URL:
http://svn.reactos.org/svn/reactos?rev=36858&view=rev
Log:
- Add some ASSERTs
Modified:
branches/aicom-network-fixes/lib/drivers/ip/network/ports.c
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/ports.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/ports.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/ports.c [iso-8859-1] Mon Oct 20
15:32:53 2008
@@ -44,6 +44,7 @@
Port = htons(Port);
ASSERT(Port >= PortSet->StartingPort);
+ ASSERT(Port < PortSet->StartingPort + PortSet->PortsToOversee);
Port -= PortSet->StartingPort;
ExAcquireFastMutex( &PortSet->Mutex );
@@ -77,6 +78,9 @@
AllocatedPort = htons(AllocatedPort);
+ ASSERT(AllocatedPort >= PortSet->StartingPort);
+ ASSERT(AllocatedPort < PortSet->StartingPort + PortSet->PortsToOversee);
+
return AllocatedPort;
}
@@ -109,5 +113,8 @@
AllocatedPort = htons(AllocatedPort);
+ ASSERT(AllocatedPort >= PortSet->StartingPort);
+ ASSERT(AllocatedPort < PortSet->StartingPort + PortSet->PortsToOversee);
+
return AllocatedPort;
}