X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=inline;f=hcache.c;h=5dc14e5e73e10fd917b88779ae129644bec47108;hb=711f787502b6a1a1c150b948a5ed9156c8ef9ba1;hp=496fd09074f2a5574d5a006adba097352421e486;hpb=9eb3b25249e78d778b6d0583b06a7c5615709e63;p=apps%2Fmadmutt.git diff --git a/hcache.c b/hcache.c index 496fd09..5dc14e5 100644 --- a/hcache.c +++ b/hcache.c @@ -46,12 +46,13 @@ #include +#include "charset.h" #include "mutt.h" #include #include "mx.h" #include "lib.h" -static struct header_cache { +struct header_cache { #if defined(HAVE_QDBM) VILLA *db; char *folder; @@ -67,7 +68,7 @@ static struct header_cache { int fd; char lockfile[_POSIX_PATH_MAX]; #endif -} HEADER_CACHE; +}; typedef union { struct timeval timeval; @@ -857,7 +858,7 @@ void *mutt_hcache_open (const char *path, const char *folder) struct stat sb; u_int32_t createflags = DB_CREATE; int ret; - struct header_cache *h = calloc (1, sizeof (HEADER_CACHE)); + struct header_cache *h = p_new(struct header_cache, 1); int pagesize = atoi (HeaderCachePageSize);