]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/sock.c
net: Add missing braces to multi-statement if()s
[linux-2.6-omap-h63xx.git] / net / core / sock.c
index 54c836a2216b4dbbf9a5668c3ec29de71d21cc51..fa76f04fa9c6fd443937702f4f869417bf217c4f 100644 (file)
@@ -228,11 +228,12 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen)
                static int warned __read_mostly;
 
                *timeo_p = 0;
-               if (warned < 10 && net_ratelimit())
+               if (warned < 10 && net_ratelimit()) {
                        warned++;
                        printk(KERN_INFO "sock_set_timeout: `%s' (pid %d) "
                               "tries to set negative timeout\n",
                                current->comm, task_pid_nr(current));
+               }
                return 0;
        }
        *timeo_p = MAX_SCHEDULE_TIMEOUT;
@@ -450,15 +451,6 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
         *      Options without arguments
         */
 
-#ifdef SO_DONTLINGER           /* Compatibility item... */
-       if (optname == SO_DONTLINGER) {
-               lock_sock(sk);
-               sock_reset_flag(sk, SOCK_LINGER);
-               release_sock(sk);
-               return 0;
-       }
-#endif
-
        if (optname == SO_BINDTODEVICE)
                return sock_bindtodevice(sk, optval, optlen);
 
@@ -942,7 +934,6 @@ static void sk_prot_free(struct proto *prot, struct sock *sk)
  *     @family: protocol family
  *     @priority: for allocation (%GFP_KERNEL, %GFP_ATOMIC, etc)
  *     @prot: struct proto associated with this new sock instance
- *     @zero_it: if we should zero the newly allocated sock
  */
 struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
                      struct proto *prot)