diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-12-07 00:09:12 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-12-07 00:44:14 -0500 |
commit | 90b33a2746ef9a409e5b70ea6ef363941c671c1d (patch) | |
tree | 9f0f71943c8c7d57639edde65af410dd02e859a9 /src/libudev/libudev-device-private.c | |
parent | 1fbcad80f0760976193303fcb5c88c8201c4f27e (diff) |
libudev: simplify udev_device_ensure_usec_initialized a bit
Diffstat (limited to 'src/libudev/libudev-device-private.c')
-rw-r--r-- | src/libudev/libudev-device-private.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libudev/libudev-device-private.c b/src/libudev/libudev-device-private.c index 2d3e62410c..2aae0726c1 100644 --- a/src/libudev/libudev-device-private.c +++ b/src/libudev/libudev-device-private.c @@ -137,14 +137,10 @@ gid_t udev_device_get_devnode_gid(struct udev_device *udev_device) { } void udev_device_ensure_usec_initialized(struct udev_device *udev_device, struct udev_device *udev_device_old) { - sd_device *device_old = NULL; - assert(udev_device); - if (udev_device_old) - device_old = udev_device_old->device; - - device_ensure_usec_initialized(udev_device->device, device_old); + device_ensure_usec_initialized(udev_device->device, + udev_device_old ? udev_device_old->device : NULL); } char **udev_device_get_properties_envp(struct udev_device *udev_device) { |