Skip to content

Commit 23f4277

Browse files
committed
Fix comment grammar and formatting
Add missing colons to parameter tags such as @q: and @capacity: for consistency. Update a comment to clarify that both head and tail sentinels never hold data.
1 parent ff94b81 commit 23f4277

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/lib/list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static inline list_node_t *list_pushback(list_t *list, void *data)
8282

8383
node->data = data;
8484
node->next = list->tail;
85-
list->tail->data = NULL; /* tail sentinel never holds data */
85+
list->tail->data = NULL; /* head and tail sentinels never hold data */
8686
list->head->data = NULL;
8787

8888
/* Insert before tail sentinel */

include/lib/queue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ typedef struct {
2828
} queue_t;
2929

3030
/* Creates and initializes a new queue.
31-
* @capacity The desired minimum capacity. The actual capacity will be rounded
31+
* @capacity: The desired minimum capacity. The actual capacity will be rounded
3232
* up to the next power of two.
3333
* Return A pointer to the newly created queue, or NULL on failure.
3434
*/
@@ -37,7 +37,7 @@ queue_t *queue_create(int32_t capacity);
3737
/* Destroys a queue and frees its resources.
3838
* This operation will fail if the queue is not empty, preventing memory
3939
* leaks of the items contained within the queue.
40-
* @q The queue to destroy.
40+
* @q: The queue to destroy.
4141
*
4242
* Return 0 on success, or a negative error code on failure.
4343
*/

0 commit comments

Comments
 (0)