]> git.baikalelectronics.ru Git - kernel.git/commit
ecryptfs: Eliminate useless code
authorJulia Lawall <julia@diku.dk>
Sat, 16 Jan 2010 16:00:26 +0000 (17:00 +0100)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Wed, 20 Jan 2010 04:36:05 +0000 (22:36 -0600)
commite76e5f4dd5e55a37b3fe368b8d65e3e7b374e0ff
tree6627afceaed30b0897298e83ceb4ecd580eeb9f0
parent50b7554b4f72fff6ac03cf879dfd35d7822dc084
ecryptfs: Eliminate useless code

The variable lower_dentry is initialized twice to the same (side effect-free)
expression.  Drop one initialization.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@

x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/file.c