From: Matthias A. <mat...@gm...> - 2005-03-06 03:00:32
|
Matthias Andree <mat...@gm...> writes: > Actually, the right code is: > > if (ctl->newsaved) > { > /* old state of mailbox may now be irrelevant */ > struct idlist **temp = &ctl->oldsaved; > if (outlevel >= O_DEBUG) > report(stdout, GT_("swapping UID lists\n")); > ctl->oldsaved = ctl->newsaved; > ctl->newsaved = (struct idlist *) NULL; > free_str_list(temp); > } Of course it's not, we'll be erasing everything. Right code is (watch where the & is!) if (ctl->newsaved) { /* old state of mailbox may now be irrelevant */ struct idlist *temp = ctl->oldsaved; if (outlevel >= O_DEBUG) report(stdout, GT_("swapping UID lists\n")); ctl->oldsaved = ctl->newsaved; ctl->newsaved = (struct idlist *) NULL; free_str_list(&temp); } Committed as SVN revision 4021. -- Matthias Andree |