X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fmessages.c;h=0eee5690d7feae1380aad512ede8110333d8f2b6;hp=11218648f8c15f86f5a5dd6c5c0ece696577e46a;hb=00d2ac2b41a6dba060837244ee87edce2fd1e465;hpb=d43f6c00b351424e903c2f2b71c34bc5902b467e 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 *