Commit in reactos/drivers/lib/oskittcp/oskittcp on MAIN
interface.c+7-31.10 -> 1.11
don't zero out OtcpEvent structure from InitOskitTCP(), because it has already been initialized at this point. Also added a check for null to avoid crash in ifa_ifwithnet()

reactos/drivers/lib/oskittcp/oskittcp
interface.c 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- interface.c	22 Sep 2004 13:35:11 -0000	1.10
+++ interface.c	22 Sep 2004 17:41:52 -0000	1.11
@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <oskittcp.h>
 #include <oskitdebug.h>
 #include <sys/param.h>
@@ -56,7 +57,6 @@
     tcp_init();
     OS_DbgPrint(OSK_MID_TRACE,("Init routing\n"));
     domaininit();
-    memset( &OtcpEvent, 0, sizeof( OtcpEvent ) );
     OS_DbgPrint(OSK_MID_TRACE,("Init Finished\n"));
     tcp_iss = 1024;
 }
@@ -455,9 +455,13 @@
     struct sockaddr_in *sin;
     struct ifaddr *ifaddr = ifa_iffind(addr, IFF_UNICAST);
 
-    sin = (struct sockaddr *)&ifaddr->ifa_addr;
+    if( ifaddr )
+    {
+       sin = (struct sockaddr *)&ifaddr->ifa_addr;
 
-    OS_DbgPrint(OSK_MID_TRACE,("ifaddr->addr = %x\n", sin->sin_addr.s_addr));
+       OS_DbgPrint(OSK_MID_TRACE,("ifaddr->addr = %x\n", 
+                                  sin->sin_addr.s_addr));
+    }
 
     return ifaddr;
 }
CVSspam 0.2.8