提交 207ec0ab 编写于 作者: J Joe Perches 提交者: David S. Miller

ipv6: Reduce switch/case indent

Make the case labels the same indent as the switch.

git diff -w shows 80 column reflowing,
removal of a useless break after return, and moving
open brace after case instead of separate line.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4500ebf8
...@@ -985,7 +985,6 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, ...@@ -985,7 +985,6 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname,
} }
return 0; return 0;
break;
default: default:
return -ENOPROTOOPT; return -ENOPROTOOPT;
...@@ -995,21 +994,19 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, ...@@ -995,21 +994,19 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname,
static int rawv6_setsockopt(struct sock *sk, int level, int optname, static int rawv6_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, unsigned int optlen) char __user *optval, unsigned int optlen)
{ {
switch(level) { switch (level) {
case SOL_RAW: case SOL_RAW:
break; break;
case SOL_ICMPV6: case SOL_ICMPV6:
if (inet_sk(sk)->inet_num != IPPROTO_ICMPV6) if (inet_sk(sk)->inet_num != IPPROTO_ICMPV6)
return -EOPNOTSUPP; return -EOPNOTSUPP;
return rawv6_seticmpfilter(sk, level, optname, optval, return rawv6_seticmpfilter(sk, level, optname, optval, optlen);
optlen);
case SOL_IPV6: case SOL_IPV6:
if (optname == IPV6_CHECKSUM) if (optname == IPV6_CHECKSUM)
break; break;
default: default:
return ipv6_setsockopt(sk, level, optname, optval, return ipv6_setsockopt(sk, level, optname, optval, optlen);
optlen);
} }
return do_rawv6_setsockopt(sk, level, optname, optval, optlen); return do_rawv6_setsockopt(sk, level, optname, optval, optlen);
...@@ -1075,21 +1072,19 @@ static int do_rawv6_getsockopt(struct sock *sk, int level, int optname, ...@@ -1075,21 +1072,19 @@ static int do_rawv6_getsockopt(struct sock *sk, int level, int optname,
static int rawv6_getsockopt(struct sock *sk, int level, int optname, static int rawv6_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen) char __user *optval, int __user *optlen)
{ {
switch(level) { switch (level) {
case SOL_RAW: case SOL_RAW:
break; break;
case SOL_ICMPV6: case SOL_ICMPV6:
if (inet_sk(sk)->inet_num != IPPROTO_ICMPV6) if (inet_sk(sk)->inet_num != IPPROTO_ICMPV6)
return -EOPNOTSUPP; return -EOPNOTSUPP;
return rawv6_geticmpfilter(sk, level, optname, optval, return rawv6_geticmpfilter(sk, level, optname, optval, optlen);
optlen);
case SOL_IPV6: case SOL_IPV6:
if (optname == IPV6_CHECKSUM) if (optname == IPV6_CHECKSUM)
break; break;
default: default:
return ipv6_getsockopt(sk, level, optname, optval, return ipv6_getsockopt(sk, level, optname, optval, optlen);
optlen);
} }
return do_rawv6_getsockopt(sk, level, optname, optval, optlen); return do_rawv6_getsockopt(sk, level, optname, optval, optlen);
...@@ -1119,15 +1114,13 @@ static int compat_rawv6_getsockopt(struct sock *sk, int level, int optname, ...@@ -1119,15 +1114,13 @@ static int compat_rawv6_getsockopt(struct sock *sk, int level, int optname,
static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg) static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg)
{ {
switch(cmd) { switch (cmd) {
case SIOCOUTQ: case SIOCOUTQ: {
{
int amount = sk_wmem_alloc_get(sk); int amount = sk_wmem_alloc_get(sk);
return put_user(amount, (int __user *)arg); return put_user(amount, (int __user *)arg);
} }
case SIOCINQ: case SIOCINQ: {
{
struct sk_buff *skb; struct sk_buff *skb;
int amount = 0; int amount = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册