From: wangweidong <wangweidong1@huawei.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
<vyasevich@gmail.com>, <nhorman@tuxdriver.com>
Cc: <dingtianhong@huawei.com>, <davem@davemloft.net>,
<linux-sctp@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/5] sctp: remove the else path
Date: Mon, 11 Nov 2013 09:57:37 +0800 [thread overview]
Message-ID: <52803991.2000902@huawei.com> (raw)
In-Reply-To: <527D3949.2000302@cogentembedded.com>
On 2013/11/9 3:19, Sergei Shtylyov wrote:
> Hello.
>
> On 11/08/2013 05:55 AM, Wang Weidong wrote:
>
>> Make the code more simplification.
>
>> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
>> ---
>> net/sctp/associola.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>
>> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
>> index 667f984..2d53d4c 100644
>> --- a/net/sctp/associola.c
>> +++ b/net/sctp/associola.c
>> @@ -954,15 +954,13 @@ int sctp_cmp_addr_exact(const union sctp_addr *ss1,
>> */
>> struct sctp_chunk *sctp_get_ecne_prepend(struct sctp_association *asoc)
>> {
>> - struct sctp_chunk *chunk;
>> + struct sctp_chunk *chunk = NULL;
>>
>> /* Send ECNE if needed.
>> * Not being able to allocate a chunk here is not deadly.
>> */
>> if (asoc->need_ecne)
>> chunk = sctp_make_ecne(asoc, asoc->last_ecne_tsn);
>> - else
>> - chunk = NULL;
>
> This is hardly better/simpler than it was.
>
> WBR, Sergei
>
Well, you are right. Joe had suggested a good idea to me. And I had fixed
it in the v2.
Thanks.
>
>
next prev parent reply other threads:[~2013-11-11 1:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 2:55 [PATCH net-next 0/5] sctp: fix and clean up Wang Weidong
2013-11-08 2:55 ` [PATCH net-next 1/5] sctp: remove the duplicate initialize Wang Weidong
2013-11-08 2:55 ` [PATCH net-next 2/5] sctp: remove the else path Wang Weidong
2013-11-08 3:00 ` Joe Perches
2013-11-08 3:07 ` wangweidong
2013-11-08 19:19 ` Sergei Shtylyov
2013-11-11 1:57 ` wangweidong [this message]
2013-11-08 2:55 ` [PATCH net-next 3/5] sctp: if we done update ssnmap, free the new ssnmap Wang Weidong
2013-11-08 3:49 ` Vlad Yasevich
2013-11-08 4:30 ` wangweidong
2013-11-08 2:55 ` [PATCH net-next 4/5] sctp: convert sctp_peer_needs_update to boolean Wang Weidong
2013-11-08 2:55 ` [PATCH net-next 5/5] sctp: fix some typos in associola.c Wang Weidong
2013-11-08 6:41 ` [PATCH net-next 0/5] sctp: fix and clean up David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52803991.2000902@huawei.com \
--to=wangweidong1@huawei.com \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=vyasevich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).