[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101021150847.3a5f3cb7@absol.kitzblitz>
Date: Thu, 21 Oct 2010 15:08:47 +0200
From: Nicolas Kaiser <nikai@...ai.net>
To: Shan Wei <shanwei@...fujitsu.com>
Cc: Vlad Yasevich <vladislav.yasevich@...com>,
Sridhar Samudrala <sri@...ibm.com>, linux-sctp@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sctp: remove redundant chunk length check
* Shan Wei <shanwei@...fujitsu.com>:
> Nicolas Kaiser wrote, at 10/21/2010 06:14 PM:
> > Checking the chunk length at this point appears redundant, as
> > the rest of the packet gets discarded anyway.
> Yes, indeed.
>
> How did you find this? By reviewing the source code?
Actually I'm tinkering with Coccinelle patches.
Here's a simple semantic patch, that will give a lot of false
positives, and a lot of "if (a) return b; return b;":
// <smpl>
@@
expression a;
statement S;
@@
- if (a)
- {
- S
- }
S
// </smpl>
Best regards,
Nicolas Kaiser
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists