]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libudev/libudev-device-private.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / libudev / libudev-device-private.c
index 2d3e62410c5724a3e2684bf890912c577dbfcbf7..868926e72bcd3c5a990e2b4c9df6a7a54b131fe2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -137,14 +138,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) {