more hash code simplifications.
[apps/madmutt.git] / lib-mx / mx.c
index d13a00f..3aaff52 100644 (file)
@@ -552,9 +552,9 @@ void mx_fastclose_mailbox (CONTEXT * ctx)
   if (MX_IDX(ctx->magic-1) && mxfmts[ctx->magic-1]->mx_fastclose_mailbox)
     mxfmts[ctx->magic-1]->mx_fastclose_mailbox(ctx);
   if (ctx->subj_hash)
-    hash_destroy (&ctx->subj_hash, NULL);
+    hash_delete (&ctx->subj_hash, NULL);
   if (ctx->id_hash)
-    hash_destroy (&ctx->id_hash, NULL);
+    hash_delete (&ctx->id_hash, NULL);
   mutt_clear_threads (ctx);
   for (i = 0; i < ctx->msgcount; i++)
     header_delete(&ctx->hdrs[i]);
@@ -906,10 +906,10 @@ void mx_update_tables (CONTEXT * ctx, int committing)
                       ctx->hdrs[i]->content->hdr_offset);
       /* remove message from the hash tables */
       if (ctx->subj_hash && ctx->hdrs[i]->env->real_subj)
-        hash_delete (ctx->subj_hash, ctx->hdrs[i]->env->real_subj,
+        hash_remove (ctx->subj_hash, ctx->hdrs[i]->env->real_subj,
                      ctx->hdrs[i], NULL);
       if (ctx->id_hash && ctx->hdrs[i]->env->message_id)
-        hash_delete (ctx->id_hash, ctx->hdrs[i]->env->message_id,
+        hash_remove (ctx->id_hash, ctx->hdrs[i]->env->message_id,
                      ctx->hdrs[i], NULL);
       header_delete(&ctx->hdrs[i]);
     }