Re: [PATCH net-next v2 4/5] net: l2tp: cleanup: remove redundant condition

2016-11-09 Thread David Miller
From: Asbjoern Sloth Toennesen Date: Mon, 7 Nov 2016 20:39:27 + > These assignments follow this pattern: > > unsigned int foo:1; > struct nlattr *nla = info->attrs[bar]; > > if (nla) > foo = nla_get_flag(nla); /* expands to: foo = !!nla */ > > This could be

[PATCH net-next v2 4/5] net: l2tp: cleanup: remove redundant condition

2016-11-07 Thread Asbjoern Sloth Toennesen
These assignments follow this pattern: unsigned int foo:1; struct nlattr *nla = info->attrs[bar]; if (nla) foo = nla_get_flag(nla); /* expands to: foo = !!nla */ This could be simplified to: if (nla) foo = 1; but lets just remove the condition and use the