[ros-diffs] [cgutman] 36798: - There is no reason to open the registry key if we aren't going to do anything with it

cgutman at svn.reactos.org cgutman at svn.reactos.org
Fri Oct 17 21:09:45 CEST 2008


Author: cgutman
Date: Fri Oct 17 14:09:44 2008
New Revision: 36798

URL: http://svn.reactos.org/svn/reactos?rev=36798&view=rev
Log:
 - There is no reason to open the registry key if we aren't going to do anything with it

Modified:
    branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c

Modified: branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c?rev=36798&r1=36797&r2=36798&view=diff
==============================================================================
--- branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Fri Oct 17 14:09:44 2008
@@ -964,7 +964,6 @@
     IP_ADDRESS DefaultMask = { 0 };
     ULONG Lookahead = LOOKAHEAD_SIZE;
     NTSTATUS Status;
-    HANDLE RegHandle = 0;
 
     TI_DbgPrint(DEBUG_DATALINK, ("Called.\n"));
 
@@ -1007,16 +1006,10 @@
 
     GetName( RegistryPath, &IF->Name );
 
-    Status = OpenRegistryKey( RegistryPath, &RegHandle );
-
-    if(NT_SUCCESS(Status)) {
-	Status = FindDeviceDescForAdapter( &IF->Name, &IF->Description );
-        TI_DbgPrint(DEBUG_DATALINK,("Adapter Description: %wZ\n",
-                    &IF->Description));
-    } else {
-	IPDestroyInterface( IF );
-	return FALSE;
-    }
+    Status = FindDeviceDescForAdapter( &IF->Name, &IF->Description );
+
+    TI_DbgPrint(DEBUG_DATALINK,("Adapter Description: %wZ\n",
+                &IF->Description));
 
     DefaultMask.Type = IP_ADDRESS_V4;
 



More information about the Ros-diffs mailing list