]> granicus.if.org Git - neomutt/commitdiff
Remove useless abstraction
authorPietro Cerutti <gahr@gahr.ch>
Fri, 30 Aug 2019 11:54:18 +0000 (11:54 +0000)
committerRichard Russon <rich@flatcap.org>
Fri, 30 Aug 2019 14:47:13 +0000 (15:47 +0100)
hcache/serialize.c

index d50ce1133c68351d45c8566d448d4cb0779d63e7..e9ad70707d84cd974d68c6af67a77c14b9ba1124 100644 (file)
 #include "email/lib.h"
 #include "hcache.h"
 
-/**
- * lazy_malloc - Allocate some memory
- * @param size Minimum size to allocate
- * @retval ptr Allocated memory
- *
- * This block is likely to be lazy_realloc()'d repeatedly.
- * It starts off with a minimum size of 4KiB.
- */
-static void *lazy_malloc(size_t size)
-{
-  if (size < 4096)
-    size = 4096;
-
-  return mutt_mem_malloc(size);
-}
-
 /**
  * lazy_realloc - Reallocate some memory
  * @param ptr Pointer to resize
@@ -586,7 +570,7 @@ void *mutt_hcache_dump(header_cache_t *hc, const struct Email *e, int *off, unsi
   bool convert = !CharsetIsUtf8;
 
   *off = 0;
-  unsigned char *d = lazy_malloc(sizeof(union Validate));
+  unsigned char *d = mutt_mem_malloc(4096);
 
   if (uidvalidity == 0)
   {