]> granicus.if.org Git - neomutt/commitdiff
imap: tiny refactor
authorRichard Russon <rich@flatcap.org>
Fri, 16 Nov 2018 12:01:54 +0000 (12:01 +0000)
committerRichard Russon <rich@flatcap.org>
Fri, 16 Nov 2018 12:33:05 +0000 (12:33 +0000)
imap/imap.c

index bc2c740524d094ee592f161588d0e49f51a0021f..0c5feb28a2a4b51870244bb8b63c1f12c14aadad 100644 (file)
@@ -1982,11 +1982,12 @@ int imap_sync_mailbox(struct Context *ctx, bool expunge, bool close)
    * there is no need to mutate the hcache after flag-only changes. */
   for (int i = 0; i < m->msg_count; i++)
   {
-    imap_edata_get(m->hdrs[i])->deleted = m->hdrs[i]->deleted;
-    imap_edata_get(m->hdrs[i])->flagged = m->hdrs[i]->flagged;
-    imap_edata_get(m->hdrs[i])->old = m->hdrs[i]->old;
-    imap_edata_get(m->hdrs[i])->read = m->hdrs[i]->read;
-    imap_edata_get(m->hdrs[i])->replied = m->hdrs[i]->replied;
+    struct ImapEmailData *edata = imap_edata_get(m->hdrs[i]);
+    edata->deleted = m->hdrs[i]->deleted;
+    edata->flagged = m->hdrs[i]->flagged;
+    edata->old = m->hdrs[i]->old;
+    edata->read = m->hdrs[i]->read;
+    edata->replied = m->hdrs[i]->replied;
     m->hdrs[i]->changed = false;
   }
   m->changed = false;