Skip to content

Commit

Permalink
econet: Reduce switch/case indent
Browse files Browse the repository at this point in the history
Make the case labels the same indent as the switch.

Simplify a default case / return (unreached)
Remove unnecessary break after return.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Jul 1, 2011
1 parent 06f8fe1 commit 075e191
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions net/econet/af_econet.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,23 +720,20 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
struct sock *sk = sock->sk;
void __user *argp = (void __user *)arg;

switch(cmd) {
case SIOCGSTAMP:
return sock_get_timestamp(sk, argp);
switch (cmd) {
case SIOCGSTAMP:
return sock_get_timestamp(sk, argp);

case SIOCGSTAMPNS:
return sock_get_timestampns(sk, argp);
case SIOCGSTAMPNS:
return sock_get_timestampns(sk, argp);

case SIOCSIFADDR:
case SIOCGIFADDR:
return ec_dev_ioctl(sock, cmd, argp);
break;
case SIOCSIFADDR:
case SIOCGIFADDR:
return ec_dev_ioctl(sock, cmd, argp);

default:
return -ENOIOCTLCMD;
}
/*NOTREACHED*/
return 0;

return -ENOIOCTLCMD;
}

static const struct net_proto_family econet_family_ops = {
Expand Down

0 comments on commit 075e191

Please sign in to comment.