]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: use swap() macro instead of taking tmp variable
authorGuo Zhengkui <guozhengkui@vivo.com>
Tue, 12 Apr 2022 06:46:20 +0000 (14:46 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 25 Apr 2022 09:07:48 +0000 (11:07 +0200)
commit40f694cd707160a30c30edf5c1e1e595ff2e6ddb
tree5d8be4f42b9ec0a734e41d6b6085be0447605ccf
parent923b7146179d8d3290dce5270430527f423a5e14
libceph: use swap() macro instead of taking tmp variable

Fix the following coccicheck warning:
net/ceph/crush/mapper.c:1077:8-9: WARNING opportunity for swap()

by using swap() for the swapping of variable values and drop
the tmp variable that is not needed any more.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/crush/mapper.c