naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone
Blob Blame History Raw
From 1fb2dabb962200cb88b5ab9d22ebe89cdfab22c4 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Sat, 9 Jul 2016 11:33:14 +0200
Subject: [PATCH] list: add list_add_tail helper

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1342515
Upstream Status: iproute2.git commit ebaf76b55ea50

commit ebaf76b55ea509bcfb8845e4c40a9ecd3e8377f5
Author: Jiri Pirko <jiri@mellanox.com>
Date:   Fri Apr 15 09:51:45 2016 +0200

    list: add list_add_tail helper

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

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;
-- 
1.8.3.1