naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0188-list-add-list_add_tail-helper.patch

049c96
From 1fb2dabb962200cb88b5ab9d22ebe89cdfab22c4 Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Sat, 9 Jul 2016 11:33:14 +0200
049c96
Subject: [PATCH] list: add list_add_tail helper
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1342515
049c96
Upstream Status: iproute2.git commit ebaf76b55ea50
049c96
049c96
commit ebaf76b55ea509bcfb8845e4c40a9ecd3e8377f5
049c96
Author: Jiri Pirko <jiri@mellanox.com>
049c96
Date:   Fri Apr 15 09:51:45 2016 +0200
049c96
049c96
    list: add list_add_tail helper
049c96
049c96
    Signed-off-by: Jiri Pirko <jiri@mellanox.com>
049c96
---
049c96
 include/list.h | 5 +++++
049c96
 1 file changed, 5 insertions(+)
049c96
049c96
diff --git a/include/list.h b/include/list.h
049c96
index b549c3e..5b529dc 100644
049c96
--- a/include/list.h
049c96
+++ b/include/list.h
049c96
@@ -33,6 +33,11 @@ static inline void list_add(struct list_head *new, struct list_head *head)
049c96
 	__list_add(new, head, head->next);
049c96
 }
049c96
 
049c96
+static inline void list_add_tail(struct list_head *new, struct list_head *head)
049c96
+{
049c96
+	__list_add(new, head->prev, head);
049c96
+}
049c96
+
049c96
 static inline void __list_del(struct list_head *prev, struct list_head *next)
049c96
 {
049c96
 	next->prev = prev;
049c96
-- 
049c96
1.8.3.1
049c96