code simplifications.
[apps/madmutt.git] / lib-mx / mh.c
index 30a987f..7c2f7e2 100644 (file)
@@ -753,19 +753,11 @@ static void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md)
     snprintf (fn, sizeof (fn), "%s/%s", ctx->path, p->h->path);
 
 #ifdef USE_HCACHE
-    if (option (OPTHCACHEVERIFY)) {
-      ret = stat (fn, &lastchanged);
-    }
-    else {
-      lastchanged.st_mtime = 0;
-      ret = 0;
-    }
-
-    if (data != NULL && !ret && lastchanged.st_mtime <= when->tv_sec) {
+    ret = stat(fn, &lastchanged);
+    if (data && !ret && lastchanged.st_mtime <= when->tv_sec) {
       p->h = mutt_hcache_restore(data, &p->h);
       maildir_parse_flags (p->h, fn);
-    }
-    else
+    } else
 #endif
     if (maildir_parse_message (ctx->magic, fn, p->h->old, p->h)) {
       p->header_parsed = 1;
@@ -773,9 +765,9 @@ static void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md)
 #ifdef USE_HCACHE
       mutt_hcache_store (hc, p->h->path + 3, p->h, 0, &maildir_hcache_keylen);
 #endif
-    }
-    else
+    } else {
       header_delete(&p->h);
+    }
 #ifdef USE_HCACHE
     p_delete(&data);
 #endif