Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5d08d71 authored by Ian Morris's avatar Ian Morris Committed by David S. Miller
Browse files

ipv6: coding style improvements (remove assignment in if statements)



This change has no functional impact and simply addresses some coding
style issues detected by checkpatch. Specifically this change
adjusts "if" statements which also include the assignment of a
variable.

No changes to the resultant object files result as determined by objdiff.

Signed-off-by: default avatarIan Morris <ipm@chirality.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78e2045d
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -2543,7 +2543,8 @@ static int inet6_addr_del(struct net *net, int ifindex, u32 ifa_flags,
	if (!dev)
		return -ENODEV;

	if ((idev = __in6_dev_get(dev)) == NULL)
	idev = __in6_dev_get(dev);
	if (idev == NULL)
		return -ENXIO;

	read_lock_bh(&idev->lock);
@@ -2690,7 +2691,8 @@ static void init_loopback(struct net_device *dev)

	ASSERT_RTNL();

	if ((idev = ipv6_find_idev(dev)) == NULL) {
	idev = ipv6_find_idev(dev);
	if (idev == NULL) {
		pr_debug("%s: add_dev failed\n", __func__);
		return;
	}
@@ -2813,7 +2815,8 @@ static void addrconf_sit_config(struct net_device *dev)
	 * our v4 addrs in the tunnel
	 */

	if ((idev = ipv6_find_idev(dev)) == NULL) {
	idev = ipv6_find_idev(dev);
	if (idev == NULL) {
		pr_debug("%s: add_dev failed\n", __func__);
		return;
	}
@@ -2837,7 +2840,8 @@ static void addrconf_gre_config(struct net_device *dev)

	ASSERT_RTNL();

	if ((idev = ipv6_find_idev(dev)) == NULL) {
	idev = ipv6_find_idev(dev);
	if (idev == NULL) {
		pr_debug("%s: add_dev failed\n", __func__);
		return;
	}
+4 −3
Original line number Diff line number Diff line
@@ -353,7 +353,8 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb)
	ahp = x->data;
	ahash = ahp->ahash;

	if ((err = skb_cow_data(skb, 0, &trailer)) < 0)
	err = skb_cow_data(skb, 0, &trailer);
	if (err < 0)
		goto out;
	nfrags = err;

@@ -559,8 +560,8 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
	if (!pskb_may_pull(skb, ah_hlen))
		goto out;


	if ((err = skb_cow_data(skb, 0, &trailer)) < 0)
	err = skb_cow_data(skb, 0, &trailer);
	if (err < 0)
		goto out;
	nfrags = err;

+2 −1
Original line number Diff line number Diff line
@@ -345,7 +345,8 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
		goto out;
	}

	if ((nfrags = skb_cow_data(skb, 0, &trailer)) < 0) {
	nfrags = skb_cow_data(skb, 0, &trailer);
	if (nfrags < 0) {
		ret = -EINVAL;
		goto out;
	}
+2 −1
Original line number Diff line number Diff line
@@ -243,7 +243,8 @@ int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
	struct icmp6hdr *icmp6h;
	int err = 0;

	if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)
	skb = skb_peek(&sk->sk_write_queue);
	if (skb == NULL)
		goto out;

	icmp6h = icmp6_hdr(skb);
+5 −1
Original line number Diff line number Diff line
@@ -654,7 +654,11 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
			goto done;

		err = -ENOMEM;
		if (sfl1 == NULL || (err = mem_check(sk)) != 0)
		if (sfl1 == NULL)
			goto done;

		err = mem_check(sk);
		if (err != 0)
			goto done;

		fl1 = fl_intern(net, fl, freq.flr_label);
Loading