Commit b3821c3f authored by George Spelvin's avatar George Spelvin Committed by Linus Torvalds

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: default avatarGeorge Spelvin <linux@horizon.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Acked-by: default avatarJoel Becker <jlbec@evilplan.org>
Reviewed-by: default avatarJie Liu <jeff.liu@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 69201bb1
...@@ -1408,10 +1408,9 @@ static void swap_refcount_rec(void *a, void *b, int size) ...@@ -1408,10 +1408,9 @@ static void swap_refcount_rec(void *a, void *b, int size)
{ {
struct ocfs2_refcount_rec *l = a, *r = b, tmp; struct ocfs2_refcount_rec *l = a, *r = b, tmp;
tmp = *(struct ocfs2_refcount_rec *)l; tmp = *l;
*(struct ocfs2_refcount_rec *)l = *l = *r;
*(struct ocfs2_refcount_rec *)r; *r = tmp;
*(struct ocfs2_refcount_rec *)r = tmp;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment