]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libudev/libudev-enumerate.c
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
[thirdparty/systemd.git] / src / libudev / libudev-enumerate.c
index f15b099ad1c5b2852335de1dffd6fd2e35b17bed..e416e178b4fa057c5d78374a644ef1367cf8701f 100644 (file)
 #include <string.h>
 #include <sys/stat.h>
 
+#include "libudev.h"
 #include "sd-device.h"
 
 #include "alloc-util.h"
 #include "device-enumerator-private.h"
 #include "device-util.h"
 #include "libudev-device-internal.h"
-#include "libudev.h"
 
 /**
  * SECTION:libudev-enumerate
@@ -370,7 +370,7 @@ _public_ int udev_enumerate_add_match_sysname(struct udev_enumerate *udev_enumer
  * Returns: 0 on success, otherwise a negative error value.
  */
 _public_ int udev_enumerate_add_syspath(struct udev_enumerate *udev_enumerate, const char *syspath) {
-        _cleanup_device_unref_ sd_device *device = NULL;
+        _cleanup_(sd_device_unrefp) sd_device *device = NULL;
         int r;
 
         assert_return(udev_enumerate, -EINVAL);