[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100907113115.GB5718@bicker>
Date: Tue, 7 Sep 2010 13:31:15 +0200
From: Dan Carpenter <error27@...il.com>
To: Shan Wei <shanwei@...fujitsu.com>
Cc: Vlad Yasevich <vladislav.yasevich@...com>,
Sridhar Samudrala <sri@...ibm.com>,
"David S. Miller" <davem@...emloft.net>,
Wei Yongjun <yjwei@...fujitsu.com>,
Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>,
linux-sctp@...r.kernel.org, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [patch] sctp: fix test for end of loop
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists