diff options
author | silby <silby@FreeBSD.org> | 2004-04-22 08:34:55 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2004-04-22 08:34:55 +0000 |
commit | b4c0a798a225a624e180b323c4dd94c9e623eec4 (patch) | |
tree | 26dccc6b9d44c74128871c6f2185eaa4423d7f65 /sys/netinet | |
parent | 760a7deec6e5e4cd0ae94c817e97d03407ec7087 (diff) | |
download | FreeBSD-src-b4c0a798a225a624e180b323c4dd94c9e623eec4.zip FreeBSD-src-b4c0a798a225a624e180b323c4dd94c9e623eec4.tar.gz |
Take out an unneeded variable I forgot to remove in the last commit,
and make two small whitespace fixes so that diffs vs rev 1.142 are minimal.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in_pcb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index a02ada7..516aa46 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -383,7 +383,7 @@ in_pcbbind_setup(inp, nam, laddrp, lportp, cred) lport = *lportp; if (lport == 0) { u_short first, last; - int count, loopcount; + int count; if (laddr.s_addr != INADDR_ANY) if (prison_ip(cred, 0, &laddr.s_addr)) @@ -411,7 +411,6 @@ in_pcbbind_setup(inp, nam, laddrp, lportp, cred) * We split the two cases (up and down) so that the direction * is not being tested on each round of the loop. */ - loopcount = 0; if (first > last) { /* * counting down @@ -419,6 +418,7 @@ in_pcbbind_setup(inp, nam, laddrp, lportp, cred) if (ipport_randomized) *lastport = first - (arc4random() % (first - last)); count = first - last; + do { if (count-- < 0) /* completely used? */ return (EADDRNOTAVAIL); @@ -435,6 +435,7 @@ in_pcbbind_setup(inp, nam, laddrp, lportp, cred) if (ipport_randomized) *lastport = first + (arc4random() % (last - first)); count = last - first; + do { if (count-- < 0) /* completely used? */ return (EADDRNOTAVAIL); |