Commit 5bd66321 authored by Jean Sacren's avatar Jean Sacren Committed by David S. Miller
Browse files

net: bareudp: fix duplicate checks of data[] expressions



Both !data[IFLA_BAREUDP_PORT] and !data[IFLA_BAREUDP_ETHERTYPE] are
checked.  We should remove the checks of data[IFLA_BAREUDP_PORT] and
data[IFLA_BAREUDP_ETHERTYPE] that follow since they are always true.

Put both statements together in group and balance the space on both
sides of '=' sign.

Signed-off-by: default avatarJean Sacren <sakiwit@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c4cb8d0a
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -577,10 +577,7 @@ static int bareudp2info(struct nlattr *data[], struct bareudp_conf *conf,
		return -EINVAL;
	}

	if (data[IFLA_BAREUDP_PORT])
	conf->port = nla_get_u16(data[IFLA_BAREUDP_PORT]);

	if (data[IFLA_BAREUDP_ETHERTYPE])
	conf->ethertype = nla_get_u16(data[IFLA_BAREUDP_ETHERTYPE]);

	if (data[IFLA_BAREUDP_SRCPORT_MIN])