X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=hcache.c;h=532a2b8d52343708528d18b49293dde65ab3ed73;hp=496fd09074f2a5574d5a006adba097352421e486;hb=23e6291cb5d5b4cd2008403d8b628007fd75ff23;hpb=9eb3b25249e78d778b6d0583b06a7c5615709e63 diff --git a/hcache.c b/hcache.c index 496fd09..532a2b8 100644 --- a/hcache.c +++ b/hcache.c @@ -42,16 +42,16 @@ #include #include -#include #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 +67,7 @@ static struct header_cache { int fd; char lockfile[_POSIX_PATH_MAX]; #endif -} HEADER_CACHE; +}; typedef union { struct timeval timeval; @@ -857,7 +857,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);