X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fstatcache.c;h=d9e801f32b8b299ab78021e10bdb5ada292bf3ed;hb=4778853be406693588bb52c5a1907494d2670afe;hp=22737f7fc9de97103fd1a9c1f1975b61e5026465;hpb=30d538a07ca018d1f39ca95be5d802c7194fb86d;p=fusedav.git diff --git a/src/statcache.c b/src/statcache.c index 22737f7..d9e801f 100644 --- a/src/statcache.c +++ b/src/statcache.c @@ -41,7 +41,6 @@ struct dir_entry { struct dir_entry *next; - int is_dir; char filename[]; }; @@ -247,7 +246,7 @@ void dir_cache_finish(const char *fn, int success) { free_dir_entries(de); } -void dir_cache_add(const char *fn, const char *subdir, int is_dir) { +void dir_cache_add(const char *fn, const char *subdir) { uint32_t h; struct cache_entry *ce; assert(cache); @@ -270,7 +269,6 @@ void dir_cache_add(const char *fn, const char *subdir, int is_dir) { assert(n); strcpy(n->filename, subdir); - n->is_dir = is_dir; n->next = ce->dir_info.entries2; ce->dir_info.entries2 = n; @@ -279,7 +277,7 @@ void dir_cache_add(const char *fn, const char *subdir, int is_dir) { pthread_mutex_unlock(&dir_cache_mutex); } -int dir_cache_enumerate(const char *fn, void (*f) (const char*fn, const char *subdir, int is_dir, void *user), void *user) { +int dir_cache_enumerate(const char *fn, void (*f) (const char*fn, const char *subdir, void *user), void *user) { uint32_t h; struct cache_entry *ce; struct dir_entry *de = NULL; @@ -302,7 +300,7 @@ int dir_cache_enumerate(const char *fn, void (*f) (const char*fn, const char *su pthread_mutex_unlock(&dir_cache_mutex); for (de = ce->dir_info.entries; de; de = de->next) - f(fn, de->filename, de->is_dir, user); + f(fn, de->filename, user); pthread_mutex_lock(&dir_cache_mutex); ce->dir_info.in_use = 0;