add const to file FIFO cache profilers

This commit is contained in:
Radim Kolar 2009-09-22 18:06:16 +02:00
parent eed479202c
commit 1f570b0049

View File

@ -66,9 +66,9 @@ static void fpcache_free_entry (void *entry)
fclose(f->fp); fclose(f->fp);
} }
static unsigned int fpcache_entry_profiler (void *entry) static unsigned int fpcache_entry_profiler (const void *entry)
{ {
FPCACHE *f=entry; const FPCACHE *f=entry;
if(f->fp) if(f->fp)
return sizeof(FILE); return sizeof(FILE);
@ -85,9 +85,9 @@ static void dirlistcache_free_entry (void * entry)
free(d->listing); free(d->listing);
} }
static unsigned int dirlistcache_entry_profiler (void *entry) static unsigned int dirlistcache_entry_profiler (const void *entry)
{ {
DIRLISTING *d=entry; const DIRLISTING *d=entry;
return d->listing_size; return d->listing_size;
} }
@ -108,10 +108,10 @@ static void dirstatcache_free_entry (void * entry)
free(d->readme); free(d->readme);
} }
static unsigned int dirstatcache_entry_profiler (void *entry) static unsigned int dirstatcache_entry_profiler (const void *entry)
{ {
/* TODO profiling for owner ip_table */ /* TODO profiling for owner ip_table */
DIRINFO *d=entry; const DIRINFO *d=entry;
unsigned int res=0; unsigned int res=0;
if(d->realname) if(d->realname)
{ {
@ -144,9 +144,9 @@ static void string_free (void * entry)
free(*s); free(*s);
} }
static unsigned int string_profiler (void *entry) static unsigned int string_profiler (const void *entry)
{ {
char **s=entry; char * const *s=entry;
if(*s!=NULL) if(*s!=NULL)
return(strlen(*s)); return(strlen(*s));