]> git.ipfire.org Git - thirdparty/systemd.git/commit
blockdev-util: don't use mixed style of retval in block_device_get_originating
authorMike Yuan <me@yhndnzj.com>
Sat, 3 May 2025 19:01:54 +0000 (21:01 +0200)
committerMike Yuan <me@yhndnzj.com>
Mon, 5 May 2025 16:39:05 +0000 (18:39 +0200)
commit60997a87ef91d53fd9f4594eb982d6a7e4fbd1ec
tree907c2e7ccb1ef4bb57cd2a4ea2d2561248899e5a
parentab2f5407a0659bc439189d241e1960f0aaf12b25
blockdev-util: don't use mixed style of retval in block_device_get_originating

We have two typical styles of 'ret' param assignment + retval:

1) < 0 on actual error, 0 on nothing (ret == NULL), > 0 on something
2) recognizable errno on nothing, < 0 on other errors, >= 0 on something

but never use both at the same time.
src/shared/blockdev-util.c
src/storagetm/storagetm.c