diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-07-17 12:56:43 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-08-14 18:25:08 -0400 |
commit | 1bf0572fe27030a0e82fc60f8323a2114c2b69d3 (patch) | |
tree | a20f73223396ffbf5eaa2a4acb2fe80f0b0f465d | |
parent | 6cff57320275b52d0a84b616602539c79e8d7117 (diff) |
ubifs: use swap macro in swap_dirty_idx
Make use of the swap macro and remove unnecessary variable *t*. This
makes the code easier to read and maintain.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r-- | fs/ubifs/find.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ubifs/find.c b/fs/ubifs/find.c index 9571616b5dda..36198f86e260 100644 --- a/fs/ubifs/find.c +++ b/fs/ubifs/find.c | |||
@@ -750,10 +750,7 @@ static int cmp_dirty_idx(const struct ubifs_lprops **a, | |||
750 | static void swap_dirty_idx(struct ubifs_lprops **a, struct ubifs_lprops **b, | 750 | static void swap_dirty_idx(struct ubifs_lprops **a, struct ubifs_lprops **b, |
751 | int size) | 751 | int size) |
752 | { | 752 | { |
753 | struct ubifs_lprops *t = *a; | 753 | swap(*a, *b); |
754 | |||
755 | *a = *b; | ||
756 | *b = t; | ||
757 | } | 754 | } |
758 | 755 | ||
759 | /** | 756 | /** |