Unverified Commit a4f2b9a7 authored by Thorsten Blum's avatar Thorsten Blum Committed by Konstantin Komarov
Browse files

fs/ntfs3: Use swap() to improve code



Use the swap() macro to simplify the code and improve its readability.

Fixes the following Coccinelle/coccicheck warning reported by
swap.cocci:

  WARNING opportunity for swap()

Compile-tested only.

Signed-off-by: default avatarThorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 8400291e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -512,8 +512,7 @@ static int lzx_decompress_block(const struct lzx_decompressor *d,
			 * the same code.  (For R0, the swap is a no-op.)
			 */
			match_offset = recent_offsets[offset_slot];
			recent_offsets[offset_slot] = recent_offsets[0];
			recent_offsets[0] = match_offset;
			swap(recent_offsets[offset_slot], recent_offsets[0]);
		} else {
			/* Explicit offset  */