Searched hist:"2 d1ee87d" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/block/drbd/ |
H A D | drbd_receiver.c | 2d1ee87d Sun Dec 27 15:27:11 CST 2009 Julia Lawall <julia@diku.dk> drivers/block/drbd: Correct NULL test
Test the just-allocated value for NULL rather than some other value.
The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/)
// <smpl> @@ expression x,y; statement S; @@
x = \(kmalloc\|kcalloc\|kzalloc\)(...); ( if ((x) == NULL) S | if ( - y + x == NULL) S ) // </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> 2d1ee87d Sun Dec 27 15:27:11 CST 2009 Julia Lawall <julia@diku.dk> drivers/block/drbd: Correct NULL test Test the just-allocated value for NULL rather than some other value. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,y; statement S; @@ x = \(kmalloc\|kcalloc\|kzalloc\)(...); ( if ((x) == NULL) S | if ( - y + x == NULL) S ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
|