Changed "common.h" to "acess.h" to reduce possible conflicts
[tpg/acess2.git] / Kernel / vfs / nodecache.c
index c503e9c..0124e62 100644 (file)
@@ -2,7 +2,7 @@
  * AcessMicro VFS
  * - File IO Passthru's
  */
-#include <common.h>
+#include <acess.h>
 #include "vfs.h"
 #include "vfs_int.h"
 
@@ -158,7 +158,7 @@ void Inode_UncacheNode(int Handle, Uint64 Inode)
 void Inode_ClearCache(int Handle)
 {
        tInodeCache     *cache;
-       tInodeCache     *prev = (tInodeCache*) &gVFS_InodeCache;
+       tInodeCache     *prev = NULL;
        tCachedInode    *ent, *next;
        
        // Find the cache
@@ -184,7 +184,10 @@ void Inode_ClearCache(int Handle)
        }
        
        // Free Cache
-       prev->Next = cache->Next;
+       if(prev == NULL)
+               gVFS_InodeCache = cache->Next;
+       else
+               prev->Next = cache->Next;
        free(cache);
 }
 

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