From 596ab474720bbd028c97755ccea31452f96760b8 Mon Sep 17 00:00:00 2001 From: Saurav Babu Date: Fri, 28 Jul 2017 15:18:23 +0530 Subject: [PATCH] Fixed compile time warning by adding upstream patches Below upstream patches were added: https://github.com/tgraf/libnl/commit/8222519f Fix the always false if (a->rt_nr_nh != a->rt_nr_nh) test Fix the always false if (a->rt_nr_nh != a->rt_nr_nh) test and compare properly the a and b structs https://github.com/tgraf/libnl/commit/9426d03e tbf: fix false missing attr Fix false missing attribute in tbf_msg_fill() when applying a tbf qdisc. Change-Id: Ia58b09d7e3eb557b6649c9bf1db6328511433c9f Signed-off-by: Saurav Babu --- lib/route/route_obj.c | 2 +- lib/route/sch/tbf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c index 7f26bfd..6f50c3a 100644 --- a/lib/route/route_obj.c +++ b/lib/route/route_obj.c @@ -403,7 +403,7 @@ static int route_compare(struct nl_object *_a, struct nl_object *_b, diff |= ROUTE_DIFF(FLAGS, (a->rt_flags ^ b->rt_flags) & b->rt_flag_mask); } else { - if (a->rt_nr_nh != a->rt_nr_nh) + if (a->rt_nr_nh != b->rt_nr_nh) goto nh_mismatch; /* search for a dup in each nh of a */ diff --git a/lib/route/sch/tbf.c b/lib/route/sch/tbf.c index eccaf70..161d564 100644 --- a/lib/route/sch/tbf.c +++ b/lib/route/sch/tbf.c @@ -166,7 +166,7 @@ static struct nl_msg *tbf_get_opts(struct rtnl_qdisc *qdisc) if (!tbf) return NULL; - if (!(tbf->qt_mask & required) != required) + if ((tbf->qt_mask & required) != required) return NULL; opts.limit = tbf->qt_limit; -- 2.7.4