From: Pietro Cerutti Date: Mon, 13 May 2019 12:25:48 +0000 (+0000) Subject: Use AddressList in mutt_addr_has_recips X-Git-Tag: 2019-10-25~200^2~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9035b4a44928520337c953e21733ec462982fad4;p=neomutt Use AddressList in mutt_addr_has_recips --- diff --git a/address/address.c b/address/address.c index 1bd761aa7..2abd24dcc 100644 --- a/address/address.c +++ b/address/address.c @@ -920,13 +920,15 @@ bool mutt_addr_cmp_strict(const struct Address *a, const struct Address *b) int mutt_addr_has_recips(struct Address *a) { int c = 0; - - for (; a; a = a->next) + struct AddressList *al = mutt_addr_to_addresslist(a); + struct AddressNode *an = NULL; + TAILQ_FOREACH(an, al, entries) { - if (!a->mailbox || a->group) + if (!an->addr->mailbox || an->addr->group) continue; c++; } + FREE(&an); return c; }