Signed-off-by: Pierre Habouzit <madcoder@debian.org>
+ for (; addr; addr = addr->next) {
pos += rfc822_write_address_single(buf + pos, buflen + 1 - pos,
addr, display);
pos += rfc822_write_address_single(buf + pos, buflen + 1 - pos,
addr, display);
- /* if there is another address, and its not a group mailbox name or
- group terminator, add a comma to separate the addresses */
if (!addr->group && addr->next && addr->next->mailbox) {
if (!addr->group && addr->next && addr->next->mailbox) {
+ /* if there is another address, and its not a group mailbox name or
+ group terminator, add a comma to separate the addresses */
- goto done;
- if (!buflen)
- goto done;
buf[pos++] = ',';
buf[pos++] = ' ';
}
buf[pos++] = ',';
buf[pos++] = ' ';
}