Author: arty
Date: Thu Nov 22 15:10:08 2007
New Revision: 30671
URL:
http://svn.reactos.org/svn/reactos?rev=30671&view=rev
Log:
Fix prefast errors (submitted by Christoph Von Wittich)
1 Function was unused.
lock.c: Add missing null check.
Modified:
trunk/reactos/drivers/network/afd/afd/lock.c
trunk/reactos/drivers/network/afd/afd/tdiconn.c
Modified: trunk/reactos/drivers/network/afd/afd/lock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/lo…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/lock.c (original)
+++ trunk/reactos/drivers/network/afd/afd/lock.c Thu Nov 22 15:10:08 2007
@@ -58,7 +58,7 @@
_SEH_TRY {
RtlCopyMemory( NewBuf, Buf, sizeof(AFD_WSABUF) * Count );
- if( LockAddress ) {
+ if( LockAddress && AddressLen ) {
NewBuf[Count].buf = AddressBuf;
NewBuf[Count].len = *AddressLen;
Count++;
Modified: trunk/reactos/drivers/network/afd/afd/tdiconn.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/tdiconn.c (original)
+++ trunk/reactos/drivers/network/afd/afd/tdiconn.c Thu Nov 22 15:10:08 2007
@@ -165,54 +165,6 @@
return Status;
}
-NTSTATUS
-TdiBuildConnectionInfoPair
-( PTDI_CONNECTION_INFO_PAIR ConnectionInfo,
- PTRANSPORT_ADDRESS From, PTRANSPORT_ADDRESS To )
- /*
- * FUNCTION: Fill a TDI_CONNECTION_INFO_PAIR struct will the two addresses
- * given.
- * ARGUMENTS:
- * ConnectionInfo: The pair
- * From: The from address
- * To: The to address
- * RETURNS:
- * Status of the operation
- */
-{
- PCHAR LayoutFrame;
- UINT SizeOfEntry;
- ULONG TdiAddressSize;
- PTDI_CONNECTION_INFORMATION FromTdiConn, ToTdiConn;
-
- /* FIXME: Get from socket information */
- TdiAddressSize = TdiAddressSizeFromType(From->Address[0].AddressType);
- SizeOfEntry = TdiAddressSize + sizeof(TDI_CONNECTION_INFORMATION);
-
- LayoutFrame = (PCHAR)ExAllocatePool(NonPagedPool, 2 * SizeOfEntry);
-
- if (!LayoutFrame) {
- AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
- return STATUS_INSUFFICIENT_RESOURCES;
- }
-
- RtlZeroMemory( LayoutFrame, 2 * SizeOfEntry );
-
- FromTdiConn = (PTDI_CONNECTION_INFORMATION)LayoutFrame;
- ToTdiConn = (PTDI_CONNECTION_INFORMATION)LayoutFrame + SizeOfEntry;
-
- if (From != NULL) {
- TdiBuildConnectionInfoInPlace( FromTdiConn, From );
- } else {
- TdiBuildNullConnectionInfoInPlace( FromTdiConn,
- From->Address[0].AddressType );
- }
-
- TdiBuildConnectionInfoInPlace( ToTdiConn, To );
-
- return STATUS_SUCCESS;
-}
-
PTA_ADDRESS TdiGetRemoteAddress( PTDI_CONNECTION_INFORMATION TdiConn )
/*
* Convenience function that rounds out the abstraction of