From 5ca163f446420c97af8a4fa37f6d0281a84bfbcf Mon Sep 17 00:00:00 2001 From: Mikkel Thestrup Date: Thu, 4 Dec 2025 21:16:10 +0100 Subject: Less cringe docs --- src/linked_list.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/linked_list.h') diff --git a/src/linked_list.h b/src/linked_list.h index 0da0c25..2a0939f 100644 --- a/src/linked_list.h +++ b/src/linked_list.h @@ -2,8 +2,7 @@ * @file linked_list.h * @brief Doubly-linked list implementation. * @details This module provides a generic doubly-linked list data structure - * that can store pointers to any data type. The list maintains both - * head and tail pointers for efficient operations at both ends. + * that can store pointers to any datatype. */ #ifndef LINKED_LIST_H @@ -69,8 +68,7 @@ struct LinkedListNode { /** * @brief Generic pointer to the node's data. * @details The caller is responsible for managing the memory - * pointed to by this pointer. This pointer can store any - * data type (int*, char*, struct*, etc.). + * pointed to by this pointer. */ void *data; }; @@ -89,8 +87,7 @@ LinkedList *linked_list_new(); /** * @brief Deallocates the given linked list and all its nodes. * - * @param ll Pointer to the linked list to delete. If NULL, this function - * does nothing. + * @param ll Pointer to the linked list to delete. If NULL. * * @note This function deallocates only the list structure and nodes, not * the data they point to. The caller retains ownership of the data. @@ -117,9 +114,7 @@ LinkedListNode *linked_list_append(LinkedList *ll, void *elem); * * @param ll Pointer to the linked list. * - * @return The data pointer of the removed first element. - * - * @pre The list must not be empty (ll->size != 0). + * @return The data pointer of the removed first element, or NULL if empty. */ void *linked_list_popfront(LinkedList *ll); -- cgit v1.2.3-70-g09d2