diff options
author | Thorsten Blum <thorsten.blum@toblux.com> | 2024-07-31 15:54:04 +0200 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2024-09-03 16:58:38 +0300 |
commit | a4f2b9a787679697e6792676298cac5c6b9b0ccb (patch) | |
tree | 8ddd98535f7afad5eef506822f9ebeff209e6c59 | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) | |
download | linux-a4f2b9a787679697e6792676298cac5c6b9b0ccb.tar.gz linux-a4f2b9a787679697e6792676298cac5c6b9b0ccb.tar.bz2 linux-a4f2b9a787679697e6792676298cac5c6b9b0ccb.zip |
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 <thorsten.blum@toblux.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
-rw-r--r-- | fs/ntfs3/lib/lzx_decompress.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ntfs3/lib/lzx_decompress.c b/fs/ntfs3/lib/lzx_decompress.c index 6b16f07073c1..4d5701024f83 100644 --- a/fs/ntfs3/lib/lzx_decompress.c +++ b/fs/ntfs3/lib/lzx_decompress.c @@ -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 */ |