From 49b002bf30612b7797380384b901c5f2f0ce95f4 Mon Sep 17 00:00:00 2001 From: Bret Lambert Date: Mon, 4 Apr 2011 13:56:12 +0000 Subject: change an if statement to a switch to reduce eye bleedage no change in .o md5 "ok gcc" claudio@ --- sys/netinet/tcp_input.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sys/netinet') diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9a6f406456f..508ab89122d 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.240 2011/01/07 17:50:42 bluhm Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.241 2011/04/04 13:56:11 blambert Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -1252,10 +1252,9 @@ after_listen: * peer is ECN capable. */ if (tcp_do_ecn) { - if ((tiflags & (TH_ACK|TH_ECE|TH_CWR)) - == (TH_ACK|TH_ECE) || - (tiflags & (TH_ACK|TH_ECE|TH_CWR)) - == (TH_ECE|TH_CWR)) { + switch (tiflags & (TH_ACK|TH_ECE|TH_CWR)) { + case TH_ACK|TH_ECE: + case TH_ECE|TH_CWR: tp->t_flags |= TF_ECN_PERMIT; tiflags &= ~(TH_ECE|TH_CWR); tcpstat.tcps_ecn_accepts++; -- cgit v1.2.3