diff options
-rw-r--r-- | drivers/mtd/ftl.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index dabf08450d0b..9fb3b0dcdac2 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -571,12 +571,8 @@ static int copy_erase_unit(partition_t *part, uint16_t srcunit, /* Update the maps and usage stats*/ - i = xfer->EraseCount; - xfer->EraseCount = eun->EraseCount; - eun->EraseCount = i; - i = xfer->Offset; - xfer->Offset = eun->Offset; - eun->Offset = i; + swap(xfer->EraseCount, eun->EraseCount); + swap(xfer->Offset, eun->Offset); part->FreeTotal -= eun->Free; part->FreeTotal += free; eun->Free = free; |