diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-06-27 01:11:59 +0530 |
---|---|---|
committer | Tyler Hicks <tyhicks@canonical.com> | 2014-07-03 16:37:56 -0500 |
commit | c4cf3ba4f34819170fee43532f729e2fc6aa9a76 (patch) | |
tree | 12babcdb754b30162abf9c74bf83bb0153aabb59 /fs/ecryptfs | |
parent | 9e78d14a9f641c0476f733f6fc559ba5cac6f52b (diff) | |
download | op-kernel-dev-c4cf3ba4f34819170fee43532f729e2fc6aa9a76.zip op-kernel-dev-c4cf3ba4f34819170fee43532f729e2fc6aa9a76.tar.gz |
ecryptfs: Drop cast
This patch does away with cast on void * and the if as it is unnecessary.
The following Coccinelle semantic patch was used for making the change:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/inode.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 87ad33e..a27121d 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -53,9 +53,7 @@ static void unlock_dir(struct dentry *dir) static int ecryptfs_inode_test(struct inode *inode, void *lower_inode) { - if (ecryptfs_inode_to_lower(inode) == (struct inode *)lower_inode) - return 1; - return 0; + return ecryptfs_inode_to_lower(inode) == lower_inode; } static int ecryptfs_inode_set(struct inode *inode, void *opaque) |