Skip to content

Commit

Permalink
ecryptfs: Eliminate useless code
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Tyler Hicks <[email protected]>
  • Loading branch information
Julia Lawall authored and Tyler Hicks committed Jan 20, 2010
1 parent fe0fc01 commit 4aa25bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ecryptfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
struct dentry *ecryptfs_dentry = file->f_path.dentry;
/* Private value of ecryptfs_dentry allocated in
* ecryptfs_lookup() */
struct dentry *lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry);
struct dentry *lower_dentry;
struct ecryptfs_file_info *file_info;

mount_crypt_stat = &ecryptfs_superblock_to_private(
Expand Down

0 comments on commit 4aa25bc

Please sign in to comment.