net/ipv6/datagram.c: Checkpatch cleanups
authorEldad Zack <eldad@fogrefinery.com>
Sun, 1 Apr 2012 07:49:03 +0000 (07:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Apr 2012 08:33:45 +0000 (04:33 -0400)
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 <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/datagram.c

index 76832c8dc89dae671905728c391ea827dabc613f..f6210d6fd7d809a7ff45d24e53d4f1254b8c6752 100644 (file)
@@ -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:
@@ -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;
@@ -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)
@@ -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)