X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fimap.c;h=022415ffb7cea26ad4eb527c032a4d19a134370e;hp=cc9f60c6094b025349b1f5db30d84b78f4e43384;hb=b17296ba049d71986028ac83f0b415a021d0691c;hpb=355d6c883e8aafb8f424c22aa576cf8262ed9e58 diff --git a/imap/imap.c b/imap/imap.c index cc9f60c..022415f 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -211,7 +211,7 @@ int imap_read_literal (FILE * fp, IMAP_DATA * idata, long bytes, progress_t* bar r = 0; #endif fputc (c, fp); - if (bar && pos % 1024) + if (bar && !(pos % 1024)) mutt_progress_bar (bar, pos); #ifdef DEBUG if (DebugLevel >= IMAP_LOG_LTRL) @@ -1257,8 +1257,6 @@ static int do_search (const pattern_t* search, int allpats) * match types, and does a better job (eg server doesn't support regexps). */ static int imap_compile_search (const pattern_t* pat, BUFFER* buf) { - char term[STRING]; - if (! do_search (pat, 0)) return 0; @@ -1291,6 +1289,7 @@ static int imap_compile_search (const pattern_t* pat, BUFFER* buf) mutt_buffer_addch (buf, ')'); } } else { + char term[STRING]; char *delim; switch (pat->op) { @@ -1520,7 +1519,7 @@ static int imap_complete_hosts (char *dest, size_t len) { } } - for (conn = mutt_socket_head (); conn->next; conn = conn->next) { + for (conn = mutt_socket_head (); conn && conn->next; conn = conn->next) { ciss_url_t url; char urlstr[LONG_STRING];