[RFC PATCH 4/5] cli: change the data structure for notmuch address deduplication
David Bremner
david at tethera.net
Sun Aug 30 04:46:35 PDT 2015
Jani Nikula <jani at nikula.org> writes:
>> I found this use of mailbox as a temporary variable confusing; despite
>> the obvious return I thought it might have something to do with the
>> g_list_append below. Maybe just make a block scope temporary variable?
>
> This is how the function would turn out with that. Better, I guess? I
> also tried to think of ways to combine the two g_list_append paths here,
> but in the end doing it like this has most clarity I think.
>
Your (new) version is fine for me. As it happens I was thinking of a
smaller tweak:
l = g_list_find_custom (list, mailbox, mailbox_compare);
if (l) {
mailbox_t *found;
talloc_free (mailbox);
found = l->data;
found->count++;
return TRUE;
}
More information about the notmuch
mailing list