loop-util: make loop_device_make() return fd in all code paths
authorLennart Poettering <lennart@poettering.net>
Tue, 20 Apr 2021 08:46:34 +0000 (10:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Apr 2021 15:12:39 +0000 (17:12 +0200)
commit38bd449f9617228e92dacf7fc0415d2f13b97af2
tree2e582ee803399e7b6284e79788957ec07cf4693d
parent02ef01ade3b16c05dfc8698181d7f562f4934ef3
loop-util: make loop_device_make() return fd in all code paths

Previously, loop_device_make() would return the device fd in one success
code path, but not the other (where' we'd just return 0).
loop_device_open() returns it in all cases.

Hence, let's clean this up, and make sure in all success code paths of
both functions we return it (even though it strictly speaking is
redundant, since we return it in LoopDevice anyway, and currently noone
actually relies on this).
src/shared/loop-util.c