Implement removePersonFromList function to delete a person node from the linked list; update documentation in users.h
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
#ifndef __FILE_OPERATIONS_H__
|
||||
#define __FILE_OPERATIONS_H__
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -111,5 +111,16 @@ int addPersonToList(node_t **_head, char *_name, char *_surname, uint32_t _depar
|
||||
*/
|
||||
int addTimeEvent(node_t *_person);
|
||||
|
||||
/**
|
||||
* @brief Removes a person node from a linked list.
|
||||
*
|
||||
* This function removes the node pointed to by _person from the linked list
|
||||
* whose head is pointed to by _head. Both parameters are double pointers to
|
||||
* allow modification of the head pointer and the node pointer.
|
||||
*
|
||||
* @param _head Double pointer to the head of the linked list.
|
||||
* @param _person Double pointer to the node representing the person to remove.
|
||||
* @return int Returns 0 on success, or a negative value on failure.
|
||||
*/
|
||||
int removePersonFromList(node_t **_head, node_t **_person);
|
||||
#endif
|
||||
Reference in New Issue
Block a user