From: Jean Sacren Date: Sun, 3 Feb 2013 21:34:10 +0000 (+0000) Subject: mcast: do not check 'rv' twice in a row X-Git-Tag: v3.9-rc1~139^2~175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56db1c5f41c2ed0300ca570fea279a7c189c18fb;p=platform%2Fkernel%2Flinux-stable.git mcast: do not check 'rv' twice in a row With the loop, don't check 'rv' twice in a row. Without the loop, 'rv' doesn't even need to be checked. Make the comment more grammar-friendly. Signed-off-by: Jean Sacren Signed-off-by: David S. Miller --- diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 8460a1f..e5de4855 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -427,11 +427,9 @@ int ip6_mc_source(int add, int omode, struct sock *sk, rv = 1; /* > 0 for insert logic below if sl_count is 0 */ for (i=0; isl_count; i++) { rv = !ipv6_addr_equal(&psl->sl_addr[i], source); - if (rv == 0) - break; + if (rv == 0) /* There is an error in the address. */ + goto done; } - if (rv == 0) /* address already there is an error */ - goto done; for (j=psl->sl_count-1; j>=i; j--) psl->sl_addr[j+1] = psl->sl_addr[j]; psl->sl_addr[i] = *source;