diff mbox

[iproute2,03/11] list: add list_add_tail helper

Message ID 1460706713-5942-4-git-send-email-jiri@resnulli.us
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Jiri Pirko April 15, 2016, 7:51 a.m. UTC
From: Jiri Pirko <jiri@mellanox.com>

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 include/list.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/include/list.h b/include/list.h
index b549c3e..5b529dc 100644
--- a/include/list.h
+++ b/include/list.h
@@ -33,6 +33,11 @@  static inline void list_add(struct list_head *new, struct list_head *head)
 	__list_add(new, head, head->next);
 }
 
+static inline void list_add_tail(struct list_head *new, struct list_head *head)
+{
+	__list_add(new, head->prev, head);
+}
+
 static inline void __list_del(struct list_head *prev, struct list_head *next)
 {
 	next->prev = prev;