]> git.notmuchmail.org Git - notmuch/blobdiff - lib/messages.c
lib: add _notmuch_message_list_empty
[notmuch] / lib / messages.c
index a88f974ff5949bd8d54b886c10949e538ff81909..ba8a9777b0842e4bdf16b5bd879b1bd4c27b04b5 100644 (file)
@@ -56,6 +56,15 @@ _notmuch_message_list_add_message (notmuch_message_list_t *list,
     list->tail = &node->next;
 }
 
+bool
+_notmuch_message_list_empty (notmuch_message_list_t *list)
+{
+    if (list == NULL)
+       return TRUE;
+
+    return (list->head == NULL);
+}
+
 notmuch_messages_t *
 _notmuch_messages_create (notmuch_message_list_t *list)
 {