diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-04-22 18:48:32 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-04-22 18:48:32 +0200 |
| commit | 9860172fce3e8d030de6a8a5ed5de2d77483795a (patch) | |
| tree | 5648252d9ba675bb6e4d5a6dc0a7222c864dc06f | |
| parent | c5c613357e45af55b9cca2ae90cfc89895a2bd48 (diff) | |
| download | plan9front-9860172fce3e8d030de6a8a5ed5de2d77483795a.tar.xz | |
devip: cleanup tcp.c
| -rw-r--r-- | sys/src/9/ip/tcp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/src/9/ip/tcp.c b/sys/src/9/ip/tcp.c index 95c03be1e..467cd550d 100644 --- a/sys/src/9/ip/tcp.c +++ b/sys/src/9/ip/tcp.c @@ -3229,8 +3229,7 @@ tcpadvise(Proto *tcp, Block *bp, char *msg) v4tov6(source, h4->tcpsrc); psource = nhgets(h4->tcpsport); pdest = nhgets(h4->tcpdport); - } - else { + } else { ipmove(dest, h6->tcpdst); ipmove(source, h6->tcpsrc); psource = nhgets(h6->tcpsport); @@ -3239,8 +3238,7 @@ tcpadvise(Proto *tcp, Block *bp, char *msg) /* Look for a connection */ qlock(tcp); - for(p = tcp->conv; *p; p++) { - s = *p; + for(p = tcp->conv; (s = *p) != nil; p++) { tcb = (Tcpctl*)s->ptcl; if(s->rport == pdest) if(s->lport == psource) |
