X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fimap.c;h=022415ffb7cea26ad4eb527c032a4d19a134370e;hb=5bba49f1904801c2221426a7d8e2cc5cce055f02;hp=b69c6cbcd8ab4c1da8ffdf31533116bc4e08ad4a;hpb=b25e26b05ff3172041861e032cb839871367a480;p=apps%2Fmadmutt.git diff --git a/imap/imap.c b/imap/imap.c index b69c6cb..022415f 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -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];