block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate()
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 1 Feb 2022 11:26:54 +0000 (12:26 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 1 Feb 2022 12:49:15 +0000 (13:49 +0100)
commitac50419460cc45a66214e6d1c3e9d0d670522f8a
tree13f52de96ee1c36f6b1efabb21aba94b1a4742c1
parent520d8b40e898158bc9a2b416d1cbdb44d2260bc7
block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate()

In order to safely maintain a mixture of #ifdef'ry with if-else-if
ladder, rearrange the last statement (!mode) first. Since it is
mutually exclusive with the other conditions, checking it first
doesn't make any logical difference, but allows to add #ifdef'ry
around in a more cleanly way.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220201112655.344373-2-f4bug@amsat.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/export/fuse.c