X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fmessages.c;h=0eee5690d7feae1380aad512ede8110333d8f2b6;hp=11218648f8c15f86f5a5dd6c5c0ece696577e46a;hb=16aa65ba2575fd504c31d9671d8c5150f8e8adf1;hpb=3f9d73884ee7c26797a1528b89e1fe63aadc3271 diff --git a/lib/messages.c b/lib/messages.c index 11218648..0eee5690 100644 --- a/lib/messages.c +++ b/lib/messages.c @@ -42,19 +42,7 @@ _notmuch_message_list_create (const void *ctx) return list; } -/* Append a single 'node' to the end of 'list'. - */ -void -_notmuch_message_list_append (notmuch_message_list_t *list, - notmuch_message_node_t *node) -{ - *(list->tail) = node; - list->tail = &node->next; -} - -/* Allocate a new node for 'message' and append it to the end of - * 'list'. - */ +/* Append 'message' to the end of 'list'. */ void _notmuch_message_list_add_message (notmuch_message_list_t *list, notmuch_message_t *message) @@ -64,7 +52,8 @@ _notmuch_message_list_add_message (notmuch_message_list_t *list, node->message = message; node->next = NULL; - _notmuch_message_list_append (list, node); + *(list->tail) = node; + list->tail = &node->next; } notmuch_messages_t *