{
char buf[LONG_STRING];
NNTP_DATA nntp_data;
- string_list_t *l;
- string_list_t emp;
+ string_list_t *l, **emp;
time_t now;
struct tm *t;
nntp_data.group = ((NNTP_DATA *) Context->data)->group;
else
nntp_data.group = NULL;
- l = serv->tail;
+
+ emp = serv->tail;
if (mutt_nntp_fetch (&nntp_data, buf, _("Adding new newsgroups..."), NULL,
add_group, serv, 0) != 0) {
return -1;
mutt_message _("Loading descriptions...");
- if (l)
- emp.next = l->next;
- else
- emp.next = serv->list;
- l = &emp;
- while (l->next) {
- l = l->next;
- ((NNTP_DATA *) l->data)->new = 1;
- nntp_get_desc ((NNTP_DATA *) l->data, ((NNTP_DATA *) l->data)->group,
- NULL, NULL);
+ for (l = *emp; l; l = l->next) {
+ ((NNTP_DATA *)l->data)->new = 1;
+ nntp_get_desc((NNTP_DATA *) l->data, ((NNTP_DATA *)l->data)->group,
+ NULL, NULL);
}
- if (emp.next)
- nntp_save_cache_index (serv);
- mutt_clear_error ();
+ if (*emp)
+ nntp_save_cache_index(serv);
+ mutt_clear_error();
return _checked;
}