From: bluhm Date: Mon, 26 Aug 2024 13:55:14 +0000 (+0000) Subject: Rearrange #ifdef TCP_SIGNATURE to keep braces balanced. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=60f67f01e17a7506b9bf1b85b1f57b5e7325a5c2;p=openbsd Rearrange #ifdef TCP_SIGNATURE to keep braces balanced. --- diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9ba66ae6d8e..0cd61cca6b0 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.406 2024/06/07 08:02:17 jsg Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.407 2024/08/26 13:55:14 bluhm Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -871,14 +871,15 @@ findpcb: /* * Process options. */ + if (optp #ifdef TCP_SIGNATURE - if (optp || (tp->t_flags & TF_SIGNATURE)) -#else - if (optp) + || (tp->t_flags & TF_SIGNATURE) #endif + ) { if (tcp_dooptions(tp, optp, optlen, th, m, iphlen, &opti, m->m_pkthdr.ph_rtableid, now)) goto drop; + } if (opti.ts_present && opti.ts_ecr) { int32_t rtt_test; @@ -2124,7 +2125,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcphdr *th, #ifdef TCP_SIGNATURE caddr_t sigp = NULL; struct tdb *tdb = NULL; -#endif /* TCP_SIGNATURE */ +#endif for (; cp && cnt > 0; cnt -= optlen, cp += optlen) { opt = cp[0]; @@ -2289,7 +2290,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcphdr *th, #ifdef TCP_SIGNATURE bad: tdb_unref(tdb); -#endif /* TCP_SIGNATURE */ +#endif return (-1); } @@ -3783,11 +3784,11 @@ syn_cache_add(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th, win = TCP_MAXWIN; bzero(&tb, sizeof(tb)); + if (optp #ifdef TCP_SIGNATURE - if (optp || (tp->t_flags & TF_SIGNATURE)) { -#else - if (optp) { + || (tp->t_flags & TF_SIGNATURE) #endif + ) { tb.pf = tp->pf; tb.sack_enable = tp->sack_enable; tb.t_flags = tcp_do_rfc1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0;