Re: [PATCH] sctp: remove redundant chunk length check

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

 



* Shan Wei <shanwei@xxxxxxxxxxxxxx>:
> 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-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux