diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-12-10 04:48:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-11 18:25:16 -0500 |
commit | dfd56b8b38fff3586f36232db58e1e9f7885a605 (patch) | |
tree | 64c7142ebf4625939f68bd3603f1d37bacb20a73 /include/net/ip.h | |
parent | 1ded132d4c3442aa3a619c94c245d7b5e0eb9731 (diff) |
net: use IS_ENABLED(CONFIG_IPV6)
Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index fd1561e88a1a..775009f9eaba 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -353,14 +353,14 @@ static inline void ip_ipgre_mc_map(__be32 naddr, const unsigned char *broadcast, | |||
353 | memcpy(buf, &naddr, sizeof(naddr)); | 353 | memcpy(buf, &naddr, sizeof(naddr)); |
354 | } | 354 | } |
355 | 355 | ||
356 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 356 | #if IS_ENABLED(CONFIG_IPV6) |
357 | #include <linux/ipv6.h> | 357 | #include <linux/ipv6.h> |
358 | #endif | 358 | #endif |
359 | 359 | ||
360 | static __inline__ void inet_reset_saddr(struct sock *sk) | 360 | static __inline__ void inet_reset_saddr(struct sock *sk) |
361 | { | 361 | { |
362 | inet_sk(sk)->inet_rcv_saddr = inet_sk(sk)->inet_saddr = 0; | 362 | inet_sk(sk)->inet_rcv_saddr = inet_sk(sk)->inet_saddr = 0; |
363 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 363 | #if IS_ENABLED(CONFIG_IPV6) |
364 | if (sk->sk_family == PF_INET6) { | 364 | if (sk->sk_family == PF_INET6) { |
365 | struct ipv6_pinfo *np = inet6_sk(sk); | 365 | struct ipv6_pinfo *np = inet6_sk(sk); |
366 | 366 | ||
@@ -379,7 +379,7 @@ static inline int sk_mc_loop(struct sock *sk) | |||
379 | switch (sk->sk_family) { | 379 | switch (sk->sk_family) { |
380 | case AF_INET: | 380 | case AF_INET: |
381 | return inet_sk(sk)->mc_loop; | 381 | return inet_sk(sk)->mc_loop; |
382 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 382 | #if IS_ENABLED(CONFIG_IPV6) |
383 | case AF_INET6: | 383 | case AF_INET6: |
384 | return inet6_sk(sk)->mc_loop; | 384 | return inet6_sk(sk)->mc_loop; |
385 | #endif | 385 | #endif |