fs/ntfs3: Use swap() to improve code
PATCH RESEND 1/1 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 Thorsten Blum <[email protected]>
--- fs/ntfs3/lib/lzx_decompress.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fs/ntfs3/lib/lzx_decompress.c +1 -3
@@ -511,9 +511,7 @@ static int lzx_decompress_block(const struct lzx_decompressor *d,* quirk allows all 3 recent offsets to be handled by * 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 */
Signature · 1 line
2.45.2