mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 23:53:49 +00:00
lib: const a couple linklist apis
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
692f6582cc
commit
396cd6366d
@ -246,7 +246,7 @@ void listnode_move_to_tail(struct list *l, struct listnode *n)
|
|||||||
LISTNODE_ATTACH(l, n);
|
LISTNODE_ATTACH(l, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void listnode_delete(struct list *list, void *val)
|
void listnode_delete(struct list *list, const void *val)
|
||||||
{
|
{
|
||||||
struct listnode *node = listnode_lookup(list, val);
|
struct listnode *node = listnode_lookup(list, val);
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ void list_delete(struct list **list)
|
|||||||
*list = NULL;
|
*list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct listnode *listnode_lookup(struct list *list, void *data)
|
struct listnode *listnode_lookup(struct list *list, const void *data)
|
||||||
{
|
{
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ extern void listnode_move_to_tail(struct list *list, struct listnode *node);
|
|||||||
* data
|
* data
|
||||||
* data to insert into list
|
* data to insert into list
|
||||||
*/
|
*/
|
||||||
extern void listnode_delete(struct list *list, void *data);
|
extern void listnode_delete(struct list *list, const void *data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the listnode corresponding to an element in a list.
|
* Find the listnode corresponding to an element in a list.
|
||||||
@ -194,7 +194,7 @@ extern void listnode_delete(struct list *list, void *data);
|
|||||||
* Returns:
|
* Returns:
|
||||||
* pointer to listnode storing the given data if found, NULL otherwise
|
* pointer to listnode storing the given data if found, NULL otherwise
|
||||||
*/
|
*/
|
||||||
extern struct listnode *listnode_lookup(struct list *list, void *data);
|
extern struct listnode *listnode_lookup(struct list *list, const void *data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Retrieve the element at the head of a list.
|
* Retrieve the element at the head of a list.
|
||||||
|
Loading…
Reference in New Issue
Block a user