diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2011-04-04 13:56:12 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2011-04-04 13:56:12 +0000 |
commit | 49b002bf30612b7797380384b901c5f2f0ce95f4 (patch) | |
tree | 57aafe111854090f98582e0e6f991fb48c2f063a /sys/netinet | |
parent | b0031333e275192956102354558f8cdfb2587a1b (diff) |
change an if statement to a switch to reduce eye bleedage
no change in .o md5
"ok gcc" claudio@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 9 |
1 files changed, 4 insertions, 5 deletions
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++; |