Skip to content
Commit 57ceb861 authored by Asbjørn Sloth Tønnesen's avatar Asbjørn Sloth Tønnesen Committed by David S. Miller
Browse files

net: l2tp: cleanup: remove redundant condition



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 macro,

	foo = nla_get_flag(nla);

Signed-off-by: default avatarAsbjoern Sloth Toennesen <asbjorn@asbjorn.st>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 97b7af09
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment