Re: kill struct inpcbtable's inpt_lastport

2015-09-21 Thread David Hill
On Sat, Sep 19, 2015 at 07:57:00PM +0200, Vincent Gross wrote: > On 09/18/15 23:39, David Hill wrote: > > On Fri, Sep 18, 2015 at 11:05:55PM +0200, Vincent Gross wrote: > >> On 09/18/15 15:18, David Hill wrote: > >>> Is this 'if (count)' statement needed? We know first > last, so count > >>> will

Re: kill struct inpcbtable's inpt_lastport

2015-09-19 Thread Vincent Gross
On 09/18/15 23:39, David Hill wrote: > On Fri, Sep 18, 2015 at 11:05:55PM +0200, Vincent Gross wrote: >> On 09/18/15 15:18, David Hill wrote: >>> Is this 'if (count)' statement needed? We know first > last, so count >>> will always be positive. lastport will always be set. >> >>> if last == first

Re: kill struct inpcbtable's inpt_lastport

2015-09-18 Thread David Hill
On Fri, Sep 18, 2015 at 11:05:55PM +0200, Vincent Gross wrote: > On 09/18/15 15:18, David Hill wrote: > > Is this 'if (count)' statement needed? We know first > last, so count > > will always be positive. lastport will always be set. > > > if last == first, then the if statement will be false an

Re: kill struct inpcbtable's inpt_lastport

2015-09-18 Thread Vincent Gross
On 09/18/15 15:18, David Hill wrote: > Is this 'if (count)' statement needed? We know first > last, so count > will always be positive. lastport will always be set. > if last == first, then the if statement will be false and lastport will > be uninitialized, I believe. > Both remarks are true,

Re: kill struct inpcbtable's inpt_lastport

2015-09-18 Thread David Hill
On Sun, Sep 13, 2015 at 11:49:45AM +0200, Vincent Gross wrote: > On 09/13/15 10:37, Claudio Jeker wrote: > > On Sun, Sep 13, 2015 at 12:18:10AM +0200, Vincent Gross wrote: > >> On 09/12/15 22:10, Claudio Jeker wrote: > >>> On Sat, Sep 12, 2015 at 02:40:59PM +0200, Vincent Gross wrote: > inpt_l

Re: kill struct inpcbtable's inpt_lastport

2015-09-18 Thread Claudio Jeker
On Fri, Sep 18, 2015 at 02:58:40PM +0200, Vincent Gross wrote: > On 09/13/15 11:49, Vincent Gross wrote: > > On 09/13/15 10:37, Claudio Jeker wrote: > >> On Sun, Sep 13, 2015 at 12:18:10AM +0200, Vincent Gross wrote: > >>> On 09/12/15 22:10, Claudio Jeker wrote: > On Sat, Sep 12, 2015 at 02:40

Re: kill struct inpcbtable's inpt_lastport

2015-09-18 Thread Vincent Gross
On 09/13/15 11:49, Vincent Gross wrote: > On 09/13/15 10:37, Claudio Jeker wrote: >> On Sun, Sep 13, 2015 at 12:18:10AM +0200, Vincent Gross wrote: >>> On 09/12/15 22:10, Claudio Jeker wrote: On Sat, Sep 12, 2015 at 02:40:59PM +0200, Vincent Gross wrote: > inpt_lastport is never read witho

Re: kill struct inpcbtable's inpt_lastport

2015-09-13 Thread Vincent Gross
On 09/13/15 10:37, Claudio Jeker wrote: > On Sun, Sep 13, 2015 at 12:18:10AM +0200, Vincent Gross wrote: >> On 09/12/15 22:10, Claudio Jeker wrote: >>> On Sat, Sep 12, 2015 at 02:40:59PM +0200, Vincent Gross wrote: inpt_lastport is never read without being written before, and only in_pcbb

Re: kill struct inpcbtable's inpt_lastport

2015-09-13 Thread Claudio Jeker
On Sun, Sep 13, 2015 at 12:18:10AM +0200, Vincent Gross wrote: > On 09/12/15 22:10, Claudio Jeker wrote: > > On Sat, Sep 12, 2015 at 02:40:59PM +0200, Vincent Gross wrote: > >> inpt_lastport is never read without being written before, and only > >> in_pcbbind() > >> and in6_pcbsetport() are using i

Re: kill struct inpcbtable's inpt_lastport

2015-09-12 Thread Vincent Gross
On 09/12/15 22:10, Claudio Jeker wrote: > On Sat, Sep 12, 2015 at 02:40:59PM +0200, Vincent Gross wrote: >> inpt_lastport is never read without being written before, and only >> in_pcbbind() >> and in6_pcbsetport() are using it. This diff removes inpt_lastport from >> struct inpcbtable and turns it

Re: kill struct inpcbtable's inpt_lastport

2015-09-12 Thread Claudio Jeker
On Sat, Sep 12, 2015 at 02:40:59PM +0200, Vincent Gross wrote: > inpt_lastport is never read without being written before, and only > in_pcbbind() > and in6_pcbsetport() are using it. This diff removes inpt_lastport from > struct inpcbtable and turns it into a local variable where it is used. > >

kill struct inpcbtable's inpt_lastport

2015-09-12 Thread Vincent Gross
inpt_lastport is never read without being written before, and only in_pcbbind() and in6_pcbsetport() are using it. This diff removes inpt_lastport from struct inpcbtable and turns it into a local variable where it is used. Ok ? -- Vincent Index: sys/netinet/in_pcb.c =