net: Move && and || to end of previous line
[deliverable/linux.git] / net / unix / af_unix.c
index fc820cd7545309645c018da6a29d170bc67ad0f2..f25511903115bbc937f68b21fcfb99048fba21cf 100644 (file)
@@ -621,7 +621,8 @@ out:
        return sk;
 }
 
-static int unix_create(struct net *net, struct socket *sock, int protocol)
+static int unix_create(struct net *net, struct socket *sock, int protocol,
+                      int kern)
 {
        if (protocol && protocol != PF_UNIX)
                return -EPROTONOSUPPORT;
@@ -1032,8 +1033,8 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
                goto out;
        addr_len = err;
 
-       if (test_bit(SOCK_PASSCRED, &sock->flags)
-               && !u->addr && (err = unix_autobind(sock)) != 0)
+       if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr &&
+           (err = unix_autobind(sock)) != 0)
                goto out;
 
        timeo = sock_sndtimeo(sk, flags & O_NONBLOCK);
@@ -1258,7 +1259,7 @@ static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_
 {
        struct sock *sk = sock->sk;
        struct unix_sock *u;
-       struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr;
+       DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, uaddr);
        int err = 0;
 
        if (peer) {
@@ -1377,8 +1378,8 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
                        goto out;
        }
 
-       if (test_bit(SOCK_PASSCRED, &sock->flags)
-               && !u->addr && (err = unix_autobind(sock)) != 0)
+       if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr
+           && (err = unix_autobind(sock)) != 0)
                goto out;
 
        err = -EMSGSIZE;
@@ -2216,7 +2217,7 @@ static const struct file_operations unix_seq_fops = {
 
 #endif
 
-static struct net_proto_family unix_family_ops = {
+static const struct net_proto_family unix_family_ops = {
        .family = PF_UNIX,
        .create = unix_create,
        .owner  = THIS_MODULE,
This page took 0.025546 seconds and 5 git commands to generate.