if (idata->check_status == IMAP_NEW_MAIL)
if (idata->check_status & IMAP_NEWMAIL_PENDING) { idata->check_status &= ~IMAP_NEWMAIL_PENDING;
int imap_check_mailbox (CONTEXT *ctx, int *index_hint){  static time_t checktime=0;  IMAP_DATA* idata;  time_t t = 0;  idata = (IMAP_DATA*) ctx->data;  /*    * gcc thinks it has to warn about uninitialized use   * of t.  This is wrong.   */    if (ImapCheckTimeout)  {     t = time(NULL);    t -= checktime;  }  /* TODO: wtf?! */  if ((ImapCheckTimeout && t >= ImapCheckTimeout)      || ((idata->reopen & IMAP_REOPEN_ALLOW) && (idata->reopen & ~IMAP_REOPEN_ALLOW)))  {    if (ImapCheckTimeout) checktime += t;    idata->check_status = 0;    if (imap_exec (idata, "NOOP", 0) != 0)    {      imap_error ("imap_check_mailbox", idata->buf);      return -1;    }        if (idata->check_status == IMAP_NEW_MAIL)      return M_NEW_MAIL;    if (idata->check_status == IMAP_REOPENED)      return M_REOPENED;  }    return 0;}