Makign debug functions thread safe
[tpg/acess2.git] / Modules / IPStack / main.c
index 6b75b77..13bc561 100644 (file)
@@ -122,6 +122,11 @@ char *IPStack_Root_ReadDir(tVFS_Node *Node, int Pos)
        }
        
        name = malloc(4);
+       if(!name) {
+               Log_Warning("IPStack", "IPStack_Root_ReadDir - malloc error");
+               LEAVE('n');
+               return NULL;
+       }
        
        // Create the name
        Pos = iface->Node.ImplInt;
@@ -170,7 +175,7 @@ tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, char *Name)
        
        for( iface = gIP_Interfaces; iface; iface = iface->Next )
        {
-               if( iface->Node.ImplInt == num )
+               if( (int)iface->Node.ImplInt == num )
                {
                        LEAVE('p', &iface->Node);
                        return &iface->Node;
@@ -535,6 +540,10 @@ int IPStack_AddInterface(char *Device)
        iface->Node.ReadDir = IPStack_Iface_ReadDir;
        iface->Node.FindDir = IPStack_Iface_FindDir;
        iface->Node.IOCtl = IPStack_Iface_IOCtl;
+       iface->Node.MkNod = NULL;
+       iface->Node.Link = NULL;
+       iface->Node.Relink = NULL;
+       iface->Node.Close = NULL;
        
        // Set Defaults
        iface->TimeoutDelay = DEFAULT_TIMEOUT;

UCC git Repository :: git.ucc.asn.au