From 9035b4a44928520337c953e21733ec462982fad4 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Mon, 13 May 2019 12:25:48 +0000 Subject: [PATCH] Use AddressList in mutt_addr_has_recips --- address/address.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; } -- 2.40.0