This removes an unneeded "ret" variable and returns directly.
Signed-off-by: Kris Katterjohn <[EMAIL PROTECTED]>
I am now subscribed to the list, so there's no need to CC me anymore.
Thanks!
--- x/net/packet/af_packet.c 2006-01-02 21:21:10.000000000 -0600
+++ y/net/packet/af_packet.c 2006-01-04 17:44:17.000000000 -0600
@@ -1324,7 +1324,6 @@ static int
packet_setsockopt(struct socket *sock, int level, int optname, char __user
*optval, int optlen)
{
struct sock *sk = sock->sk;
- int ret;
if (level != SOL_PACKET)
return -ENOPROTOOPT;
@@ -1346,10 +1345,9 @@ packet_setsockopt(struct socket *sock, i
if (len < (mreq.mr_alen + offsetof(struct packet_mreq,
mr_address)))
return -EINVAL;
if (optname == PACKET_ADD_MEMBERSHIP)
- ret = packet_mc_add(sk, &mreq);
+ return packet_mc_add(sk, &mreq);
else
- ret = packet_mc_drop(sk, &mreq);
- return ret;
+ return packet_mc_drop(sk, &mreq);
}
#endif
#ifdef CONFIG_PACKET_MMAP
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html