]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-device: allow sd_device_get_devtype to be called with NULL arg and do not assert
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 23 Oct 2019 15:49:03 +0000 (17:49 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Oct 2019 09:48:08 +0000 (11:48 +0200)
commit730b76bd2cd5f0866baa738ae283e3b62544a28f
tree236935c214c56f239143c22be0055611f737404b
parent0e7f5ad9d3c73f50582b87d96912790b51b641d7
sd-device: allow sd_device_get_devtype to be called with NULL arg and do not assert

We shouldn't call assert() on user-specified arguments in public functions.
While at it, let's return 1 if the type exists, and 0 otherwise.
src/libsystemd/sd-device/sd-device.c