193 files changed, 80411 insertions, 44563 deletions
diff --git a/libntfs-3g/cache.c b/libntfs-3g/cache.c index dd14767..2ad8d35 100755 --- a/libntfs-3g/cache.c +++ b/libntfs-3g/cache.c @@ -1,7 +1,7 @@ /** * cache.c : deal with LRU caches * - * Copyright (c) 2008-2009 Jean-Pierre Andre + * Copyright (c) 2008-2010 Jean-Pierre Andre * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -298,7 +298,7 @@ struct CACHED_GENERIC *ntfs_enter_cache(struct CACHE_HEADER *cache, if (cache->most_recent_entry) cache->most_recent_entry->previous = current; cache->most_recent_entry = current; - memcpy(current->fixed, item->fixed, cache->fixed_size); + memcpy(current->payload, item->payload, cache->fixed_size); if (item->varsize) { if (current->variable) { memcpy(current->variable, @@ -376,7 +376,6 @@ int ntfs_invalidate_cache(struct CACHE_HEADER *cache, int flags) { struct CACHED_GENERIC *current; - struct CACHED_GENERIC *previous; struct CACHED_GENERIC *next; struct HASH_ENTRY *link; int count; @@ -412,7 +411,6 @@ int ntfs_invalidate_cache(struct CACHE_HEADER *cache, * Search sequentially in LRU list */ current = cache->most_recent_entry; - previous = (struct CACHED_GENERIC*)NULL; while (current) { if (!compare(current, item)) { next = current->next; @@ -423,7 +421,6 @@ int ntfs_invalidate_cache(struct CACHE_HEADER *cache, current = next; count++; } else { - previous = current; current = current->next; } } |