Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet - unwrap short lines.



details:   https://anonhg.NetBSD.org/src/rev/cd5d57e01e71
branches:  trunk
changeset: 574618:cd5d57e01e71
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sun Mar 06 23:06:40 2005 +0000

description:
- unwrap short lines.
- remove unneeded parenthesis.
- whitespace.

diffstat:

 sys/netinet/tcp_sack.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (49 lines):

diff -r 2061f40db6a8 -r cd5d57e01e71 sys/netinet/tcp_sack.c
--- a/sys/netinet/tcp_sack.c    Sun Mar 06 23:05:56 2005 +0000
+++ b/sys/netinet/tcp_sack.c    Sun Mar 06 23:06:40 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_sack.c,v 1.3 2005/03/06 23:05:56 yamt Exp $ */
+/* $NetBSD: tcp_sack.c,v 1.4 2005/03/06 23:06:40 yamt Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -109,7 +109,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_sack.c,v 1.3 2005/03/06 23:05:56 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_sack.c,v 1.4 2005/03/06 23:06:40 yamt Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -239,8 +239,7 @@
         * sends us a sack option with invalid length, don't
         * update the scoreboard.
         */
-       if (!TCP_SACK_ENABLED(tp) ||
-                       (optlen % 8 != 2 || optlen < 10)) {
+       if (!TCP_SACK_ENABLED(tp) || (optlen % 8 != 2 || optlen < 10)) {
                return;
        }
 
@@ -258,9 +257,8 @@
                left = ntohl(left);
                right = ntohl(right);
 
-               if ((SEQ_LEQ(right, acked)) ||
-                               SEQ_GEQ(left, tp->snd_max) ||
-                               SEQ_GEQ(left, right)) {
+               if (SEQ_LEQ(right, acked) || SEQ_GEQ(left, tp->snd_max) ||
+                   SEQ_GEQ(left, right)) {
                        /* SACK entry that's old, or invalid. */
                        i--;
                        num_sack_blks--;
@@ -373,7 +371,7 @@
                         * Need to append new hole at end.
                         */
                        tmp = (struct sackhole *)
-                               pool_get(&sackhole_pool, PR_NOWAIT);
+                           pool_get(&sackhole_pool, PR_NOWAIT);
                        if (tmp == NULL)
                                continue; /* ENOBUFS */
                        tmp->start = tp->rcv_lastsack;



Home | Main Index | Thread Index | Old Index