Skip to content

Commit

Permalink
net/ipv6/datagram.c: Checkpatch cleanups
Browse files Browse the repository at this point in the history
datagram.c:101: ERROR: "(foo*)" should be "(foo *)"
datagram.c:521: ERROR: space required before the open parenthesis '('
datagram.c:830: WARNING: braces {} are not necessary for single statement blocks
datagram.c:849: WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Eldad Zack <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
eldad authored and davem330 committed Apr 2, 2012
1 parent d94d34a commit b5a4257
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions net/ipv6/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
sin.sin_port = usin->sin6_port;

err = ip4_datagram_connect(sk,
(struct sockaddr*) &sin,
(struct sockaddr *) &sin,
sizeof(sin));

ipv4_connected:
Expand Down Expand Up @@ -518,7 +518,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
unsigned len;
u8 *ptr = nh + off;

switch(nexthdr) {
switch (nexthdr) {
case IPPROTO_DSTOPTS:
nexthdr = ptr[0];
len = (ptr[1] + 1) << 3;
Expand Down Expand Up @@ -827,9 +827,8 @@ int datagram_send_ctl(struct net *net, struct sock *sk,
int tc;

err = -EINVAL;
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int))) {
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int)))
goto exit_f;
}

tc = *(int *)CMSG_DATA(cmsg);
if (tc < -1 || tc > 0xff)
Expand All @@ -846,9 +845,8 @@ int datagram_send_ctl(struct net *net, struct sock *sk,
int df;

err = -EINVAL;
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int))) {
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int)))
goto exit_f;
}

df = *(int *)CMSG_DATA(cmsg);
if (df < 0 || df > 1)
Expand Down

0 comments on commit b5a4257

Please sign in to comment.