[PATCH] route/tc: Remove unnecessary check for tc_kind member of struct rtnl_tc

Tobias Klauser tklauser at distanz.ch
Tue Apr 28 04:36:40 PDT 2015


The tc_kind member of struct rtnl_tc (and all types which can be
converted to it) is defined as an array and can thus never be
NULL.

Signed-off-by: Tobias Klauser <tklauser at distanz.ch>
---
 lib/route/tc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/route/tc.c b/lib/route/tc.c
index 579405e..b3f4ac3 100644
--- a/lib/route/tc.c
+++ b/lib/route/tc.c
@@ -1053,9 +1053,6 @@ void *rtnl_tc_data(struct rtnl_tc *tc)
 		size_t size;
 
 		if (!tc->tc_ops) {
-			if (!tc->tc_kind)
-				BUG();
-
 			if (!rtnl_tc_get_ops(tc))
 				return NULL;
 		}
-- 
2.2.2





More information about the libnl mailing list