net: ipmr: make ip_mroute_getsockopt more understandable
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Sat, 21 Nov 2015 14:57:28 +0000 (15:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Nov 2015 20:06:38 +0000 (15:06 -0500)
commitfe9ef3ce395d06e4f17e5995ab8455b9627f3306
treee76b51d53a559afc69fe20e66fc4697041c3d4db
parent7ef8f65df976369588fa1b6466668b1b6a26eb3c
net: ipmr: make ip_mroute_getsockopt more understandable

Use a switch to determine if optname is correct and set val accordingly.
This produces a much more straight-forward and readable code.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr.c