]> granicus.if.org Git - neomutt/commitdiff
Use AddressList in mutt_addr_search
authorPietro Cerutti <gahr@gahr.ch>
Mon, 13 May 2019 12:26:06 +0000 (12:26 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 23 May 2019 10:57:09 +0000 (11:57 +0100)
address/address.c

index 2abd24dccb92bee8945d36fa71af52456cdfac08..e424fed66c54ff8a6b5121d0f8228683b39e0171 100644 (file)
@@ -957,9 +957,11 @@ bool mutt_addr_cmp(struct Address *a, struct Address *b)
  */
 bool mutt_addr_search(struct Address *a, struct Address *lst)
 {
-  for (; lst; lst = lst->next)
+  struct AddressList *al = mutt_addr_to_addresslist(lst);
+  struct AddressNode *an = NULL;
+  TAILQ_FOREACH(an, al, entries)
   {
-    if (mutt_addr_cmp(a, lst))
+    if (mutt_addr_cmp(a, an->addr))
       return true;
   }
   return false;