LISTGROUP isn't as efficient as XOVER. Only use it if needed.
[apps/madmutt.git] / nntp / newsrc.c
index 1a50b0d..59ca74f 100644 (file)
@@ -161,7 +161,7 @@ static int nntp_parse_cacheindex (NNTP_SERVER * news)
   if (!news || !news->conn || !news->conn->account.host)
     return -1;
   unset_option (OPTNEWSCACHE);
-  if (!NewsCacheDir || !*NewsCacheDir)
+  if (m_strisempty(NewsCacheDir))
     return 0;
 
   m_strcpy(dir, sizeof(dir), NewsCacheDir);
@@ -274,7 +274,7 @@ int nntp_parse_url (const char *server, ACCOUNT * act,
 
   if (url.scheme == U_NNTP || url.scheme == U_NNTPS) {
     if (url.scheme == U_NNTPS) {
-      act->flags |= M_ACCT_SSL;
+      act->has_ssl = 1;
       act->port = NNTP_SSL_PORT;
     }
 
@@ -441,8 +441,7 @@ void nntp_get_status (CONTEXT * ctx, HEADER * h, char *group, int article)
 
 void mutt_newsgroup_stat (NNTP_DATA * data)
 {
-  int i;
-  unsigned int first, last;
+  int i, first, last;
 
   data->unread = 0;
   if (data->lastMessage == 0 || data->firstMessage > data->lastMessage)
@@ -530,7 +529,7 @@ void newsrc_gen_entries (CONTEXT * ctx)
 {
   NNTP_DATA *data = (NNTP_DATA *) ctx->data;
   int series, x;
-  unsigned int last = 0, first = 1;
+  int last = 0, first = 1;
   int save_sort = SORT_ORDER;
 
   if (Sort != SORT_ORDER) {
@@ -1066,7 +1065,7 @@ void nntp_buffy (char* dst, ssize_t dstlen) {
       if (data && data->subscribed && data->unread) {
         if (Context && Context->magic == M_NNTP &&
             !m_strcmp(data->group, ((NNTP_DATA *) Context->data)->group)) {
-          unsigned int i, unread = 0;
+          int i, unread = 0;
 
           for (i = 0; i < Context->msgcount; i++)
             if (!Context->hdrs[i]->read && !Context->hdrs[i]->deleted)