aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Spelvin <linux@horizon.com>2014-06-04 19:06:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:53:54 -0400
commitb3821c3f866a1c02d1537ab67abe9a824d1353ae (patch)
tree177e80546b2589dbd831d8119ebe365eb210694e
parent69201bb1132718f45078ba6454093f5e220c0350 (diff)
ocfs2: remove some redundant casting
There are two standard techniques for dereferencing structures pointed to by void *: cast to the right type each time they're used, or assign to local variables of the right type. But there's no need to do *both*. Signed-off-by: George Spelvin <linux@horizon.com> Cc: Mark Fasheh <mfasheh@suse.com> Acked-by: Joel Becker <jlbec@evilplan.org> Reviewed-by: Jie Liu <jeff.liu@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/ocfs2/refcounttree.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 6ba4bcbc4796..714e53b9cc66 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -1408,10 +1408,9 @@ static void swap_refcount_rec(void *a, void *b, int size)
1408{ 1408{
1409 struct ocfs2_refcount_rec *l = a, *r = b, tmp; 1409 struct ocfs2_refcount_rec *l = a, *r = b, tmp;
1410 1410
1411 tmp = *(struct ocfs2_refcount_rec *)l; 1411 tmp = *l;
1412 *(struct ocfs2_refcount_rec *)l = 1412 *l = *r;
1413 *(struct ocfs2_refcount_rec *)r; 1413 *r = tmp;
1414 *(struct ocfs2_refcount_rec *)r = tmp;
1415} 1414}
1416 1415
1417/* 1416/*