1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

sd-device-enumerator: shorten code a bit

This commit is contained in:
Yu Watanabe 2021-02-21 04:33:01 +09:00
parent 3f15ce66e0
commit 9520c2f62b

View File

@ -285,13 +285,11 @@ int device_enumerator_add_device(sd_device_enumerator *enumerator, sd_device *de
static bool match_sysattr_value(sd_device *device, const char *sysattr, const char *match_value) {
const char *value;
int r;
assert(device);
assert(sysattr);
r = sd_device_get_sysattr_value(device, sysattr, &value);
if (r < 0)
if (sd_device_get_sysattr_value(device, sysattr, &value) < 0)
return false;
if (!match_value)