Jani Nikula <j...@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;
        }

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to