]> git-server-git.apps.pok.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>
Wed, 18 May 2022 12:07:07 +0000 (14:07 +0200)
commit70abce81181307e5c1b89892c84043015b3df49f
tree3174f60ca7fb83892feee728e03d8abd72220062
parentd28e75bb79a66f829ddcdea413f8849290793dae
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