[PATCH] net/ipv4/tcp.c little cleanup
From: Eduard Roccatello
Date: Thu Jan 22 2004 - 16:55:16 EST
Hello,
i've done a little cleanup to net/ipv4/tcp.c
I hope it is ok :-)
Best regards,
Eduard Roccatello
--- net/ipv4/tcp.c.orig 2004-01-22 22:49:38.000000000 +0100
+++ net/ipv4/tcp.c 2004-01-22 22:42:38.000000000 +0100
@@ -549,9 +549,9 @@ int tcp_listen_start(struct sock *sk)
return -ENOMEM;
memset(lopt, 0, sizeof(struct tcp_listen_opt));
- for (lopt->max_qlen_log = 6; ; lopt->max_qlen_log++)
- if ((1 << lopt->max_qlen_log) >= sysctl_max_syn_backlog)
- break;
+ lopt->max_qlen_log = 6;
+ while (sysctl_max_syn_backlog > (1 << lopt->max_qlen_log))
+ lopt->max_qlen_log++;
get_random_bytes(&lopt->hash_rnd, 4);
write_lock_bh(&tp->syn_wait_lock);