X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=hcache.c;h=62ef8dc9aa0fea57d88001c95aeb9ab0c9893d30;hp=734014d6fd649ddfee9cf1ef7c574da59e08abd6;hb=babaee2b3c92746ec5bd6914222dd9a9eda67285;hpb=39066752e08757d65381c18b27b2df0860574472 diff --git a/hcache.c b/hcache.c index 734014d..62ef8dc 100644 --- a/hcache.c +++ b/hcache.c @@ -177,9 +177,6 @@ static unsigned char *dump_address (ADDRESS * a, unsigned char *d, int *off) d = dump_int (0xdeadbeef, d, off); while (a) { -#ifdef EXACT_ADDRESS - d = dump_char (a->val, d, off); -#endif d = dump_char (a->personal, d, off); d = dump_char (a->mailbox, d, off); d = dump_int (a->group, d, off); @@ -200,9 +197,6 @@ static void restore_address (ADDRESS ** a, const unsigned char *d, int *off) while (counter) { *a = safe_malloc (sizeof (ADDRESS)); -#ifdef EXACT_ADDRESS - restore_char (&(*a)->val, d, off); -#endif restore_char (&(*a)->personal, d, off); restore_char (&(*a)->mailbox, d, off); restore_int ((unsigned int *) &(*a)->group, d, off); @@ -463,12 +457,6 @@ static int generate_crc32 () safe_strlen ("HAVE_LANGINFO_CODESET")); #endif -#if EXACT_ADDRESS - crc = - crc32 (crc, (unsigned char const *) "EXACT_ADDRESS", - safe_strlen ("EXACT_ADDRESS")); -#endif - #ifdef USE_POP crc = crc32 (crc, (unsigned char const *) "USE_POP", safe_strlen ("USE_POP")); @@ -618,9 +606,6 @@ mutt_hcache_open(const char *path, const char *folder) { struct header_cache *h = safe_calloc(1, sizeof (HEADER_CACHE)); int flags = VL_OWRITER | VL_OCREAT; -#if 0 /* FIXME */ - int pagesize = atoi(HeaderCachePageSize) ? atoi(HeaderCachePageSize) : 16384; -#endif h->db = NULL; h->folder = safe_strdup(folder); h->crc = generate_crc32(); @@ -683,9 +668,7 @@ mutt_hcache_fetch(void *db, const char *filename, if (! crc32_matches(data, h->crc)) { - if (data) { - FREE(&data); - } + FREE(&data); return NULL; } @@ -810,7 +793,7 @@ void *mutt_hcache_fetch (void *db, const char *filename, data = gdbm_fetch (h->db, key); if (!crc32_matches (data.dptr, h->crc)) { - free (data.dptr); + FREE(&data.dptr); return NULL; } @@ -990,7 +973,7 @@ void *mutt_hcache_fetch (void *db, const char *filename, h->db->get (h->db, NULL, &key, &data, 0); if (!crc32_matches (data.data, h->crc)) { - free (data.data); + FREE(&data.data); return NULL; }