From: Saurav Babu Date: Fri, 28 Jul 2017 09:48:23 +0000 (+0530) Subject: Fixed compile time warning by adding upstream patches X-Git-Tag: tizen_6.5.m2_release X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Ftizen_6.5.m2_release;p=platform%2Fupstream%2Flibnl2.git 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 --- 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;