]> err.no Git - linux-2.6/blobdiff - net/socket.c
tcp: (whitespace only) fix confusing indentation
[linux-2.6] / net / socket.c
index 31105f9048a8a0561123c998279e443b582400ce..8ef8ba81b9e2048c93363f4a2f98f73b7778cdce 100644 (file)
@@ -265,7 +265,7 @@ static void sock_destroy_inode(struct inode *inode)
                        container_of(inode, struct socket_alloc, vfs_inode));
 }
 
-static void init_once(struct kmem_cache *cachep, void *foo)
+static void init_once(void *foo)
 {
        struct socket_alloc *ei = (struct socket_alloc *)foo;
 
@@ -1222,6 +1222,12 @@ asmlinkage long sys_socket(int family, int type, int protocol)
        struct socket *sock;
        int flags;
 
+       /* Check the SOCK_* constants for consistency.  */
+       BUILD_BUG_ON(SOCK_CLOEXEC != O_CLOEXEC);
+       BUILD_BUG_ON((SOCK_MAX | SOCK_TYPE_MASK) != SOCK_TYPE_MASK);
+       BUILD_BUG_ON(SOCK_CLOEXEC & SOCK_TYPE_MASK);
+       BUILD_BUG_ON(SOCK_NONBLOCK & SOCK_TYPE_MASK);
+
        flags = type & ~SOCK_TYPE_MASK;
        if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK))
                return -EINVAL;