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>
This commit is contained in:
parent
6cff573202
commit
1bf0572fe2
@ -750,10 +750,7 @@ static int cmp_dirty_idx(const struct ubifs_lprops **a,
|
|||||||
static void swap_dirty_idx(struct ubifs_lprops **a, struct ubifs_lprops **b,
|
static void swap_dirty_idx(struct ubifs_lprops **a, struct ubifs_lprops **b,
|
||||||
int size)
|
int size)
|
||||||
{
|
{
|
||||||
struct ubifs_lprops *t = *a;
|
swap(*a, *b);
|
||||||
|
|
||||||
*a = *b;
|
|
||||||
*b = t;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user