lkml.org 
[lkml]   [2009]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] drivers/block: adjust NULL test
Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> dtp is derefenced on the lines above the test !dtp, and so it cannot be
> NULL at this point.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://www.emn.fr/x-info/coccinelle/)
>
> // <smpl>
> @r@
> expression x,E,E1;
> identifier f,l;
> position p1,p2;
> @@
>
> *x@p1->f = E1;
> ... when != x = E
> when != goto l;
> (
> *x@p2 == NULL
> |
> *x@p2 != NULL
> )
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>

Indeed, added to my temp block tree. Will forward upstream in a few
days.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2009-07-17 08:31    [W:0.024 / U:10.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site