list->count++;
}
-/* Add new node with sort function. */
+/*
+ * Add a node to the list. If the list was sorted according to the
+ * cmp function, insert a new node with the given val such that the
+ * list remains sorted. The new node is always inserted; there is no
+ * notion of omitting duplicates.
+ */
void
listnode_add_sort (struct list *list, void *val)
{