diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-29 09:32:21 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-29 09:33:33 +0100 |
commit | 5a937ea2f66ced76dcaa2075382c041998110185 (patch) | |
tree | ed8ba4122fb77bdfd44a24355d2f66d45932f6f2 /src/rfkill | |
parent | sd-device: make several sd_device_get_*() accepts NULL pointer for buffer of ... (diff) | |
download | systemd-5a937ea2f66ced76dcaa2075382c041998110185.tar.xz systemd-5a937ea2f66ced76dcaa2075382c041998110185.zip |
sd-device: make sd_device_get_is_initialized() returns is_initialized by return value
Diffstat (limited to 'src/rfkill')
-rw-r--r-- | src/rfkill/rfkill.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c index b7316313c4..9e7d201add 100644 --- a/src/rfkill/rfkill.c +++ b/src/rfkill/rfkill.c @@ -111,12 +111,12 @@ static int wait_for_initialized( _cleanup_(sd_event_unrefp) sd_event *event = NULL; _cleanup_(sd_device_unrefp) sd_device *d = NULL; struct DeviceMonitorData data = {}; - int initialized, r; + int r; assert(device); assert(ret); - if (sd_device_get_is_initialized(device, &initialized) >= 0 && initialized) { + if (sd_device_get_is_initialized(device) > 0) { *ret = sd_device_ref(device); return 0; } @@ -152,7 +152,7 @@ static int wait_for_initialized( return log_full_errno(IN_SET(r, -ENOENT, -ENXIO, -ENODEV) ? LOG_DEBUG : LOG_ERR, r, "Failed to open device '%s': %m", data.sysname); - if (sd_device_get_is_initialized(d, &initialized) >= 0 && initialized) { + if (sd_device_get_is_initialized(d) > 0) { *ret = TAKE_PTR(d); return 0; } |