Re: [patch] sctp: fix test for end of loop

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

 



On Tue, Sep 07, 2010 at 04:46:58PM +0800, Shan Wei wrote:
> Dan Carpenter wrote, at 09/06/2010 08:26 PM:
> > +	    &new_addr->transports != &new_asoc->peer.transport_addr_list) {
> 
> why did you add this check?
> 

That's the check which tells us if we broke out of the loop or if we
came to the end of the list.

As I explained before, the only way that the check matters is if the
list is empty.  With the current code I do not think we ever call this
function with an empty list, so that check is not needed.  But the code
could change I suppose and it doesn't hurt to be cautious.  On the other
hand, I'm fine with removing the check as well.

regards,
dan carpenter

> 
> -- 
> Best Regards
> -----
> Shan Wei
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux