public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/ipv4/tcp.c little cleanup
@ 2004-01-22 21:53 Eduard Roccatello
  2004-01-22 23:48 ` Willy Tarreau
  0 siblings, 1 reply; 4+ messages in thread
From: Eduard Roccatello @ 2004-01-22 21:53 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

Hello,
i've done a little cleanup to net/ipv4/tcp.c

I hope it is ok :-)

Best regards,
Eduard Roccatello

[-- Attachment #2: tcp.c.patch --]
[-- Type: text/x-diff, Size: 561 bytes --]

--- 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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-01-23 22:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-22 21:53 [PATCH] net/ipv4/tcp.c little cleanup Eduard Roccatello
2004-01-22 23:48 ` Willy Tarreau
2004-01-23 20:03   ` Eduard Roccatello
2004-01-23 22:27     ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox