ipv6: use IS_ENABLED()
#if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE) can be replaced by #if IS_ENABLED(CONFIG_FOO) Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
cc535dfb6a
commit
07a936260a
@@ -397,7 +397,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
|
||||
if (optname == IPV6_RTHDR && opt && opt->srcrt) {
|
||||
struct ipv6_rt_hdr *rthdr = opt->srcrt;
|
||||
switch (rthdr->type) {
|
||||
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6_MIP6)
|
||||
case IPV6_SRCRT_TYPE_2:
|
||||
if (rthdr->hdrlen != 2 ||
|
||||
rthdr->segments_left != 1)
|
||||
|
Reference in New Issue
Block a user