more hash code simplifications.
[apps/madmutt.git] / nntp / nntp.c
index d5b72f7..c2f8002 100644 (file)
@@ -831,7 +831,7 @@ static int nntp_open_mailbox (CONTEXT * ctx)
     nntp_data = xmalloc(sizeof(NNTP_DATA) + m_strlen(buf) + 1);
     nntp_data->group = (char *) nntp_data + sizeof (NNTP_DATA);
     strcpy (nntp_data->group, buf);
-    hash_insert (serv->newsgroups, nntp_data->group, nntp_data, 0);
+    hash_insert (serv->newsgroups, nntp_data->group, nntp_data);
     nntp_add_to_list (serv, nntp_data);
   }
   ctx->data = nntp_data;
@@ -860,7 +860,7 @@ static int nntp_open_mailbox (CONTEXT * ctx)
 
       /* CACHE: delete cache and line from .index */
       nntp_delete_cache (nntp_data);
-      hash_delete (serv->newsgroups, nntp_data->group, NULL,
+      hash_remove (serv->newsgroups, nntp_data->group, NULL,
                    nntp_delete_data);
       while (l && l->data != (void *) nntp_data)
         l = l->next;
@@ -1233,8 +1233,8 @@ static int add_group (char *buf, void *serv)
     strcpy (nntp_data->group, group);
     nntp_data->nserv = s;
     if (s->newsgroups->nelem < s->newsgroups->curnelem * 2)
-      s->newsgroups = hash_resize (s->newsgroups, s->newsgroups->nelem * 2);
-    hash_insert (s->newsgroups, nntp_data->group, nntp_data, 0);
+      hash_resize (s->newsgroups, s->newsgroups->nelem * 2);
+    hash_insert (s->newsgroups, nntp_data->group, nntp_data);
     nntp_add_to_list (s, nntp_data);
   }
   nntp_data->deleted = 0;
@@ -1385,7 +1385,7 @@ int nntp_get_active (NNTP_SERVER * serv)
 
     if (data && data->deleted && !data->rc) {
       nntp_delete_cache (data);
-      hash_delete (serv->newsgroups, data->group, NULL, nntp_delete_data);
+      hash_remove (serv->newsgroups, data->group, NULL, nntp_delete_data);
       tmp->data = NULL;
     }
   }