summaryrefslogtreecommitdiffstats
path: root/src/libudev/libudev-enumerate.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-05-15 22:57:58 +0200
committerKay Sievers <kay@vrfy.org>2012-05-15 23:06:26 +0200
commit20bbd54f603994a3cc211d2795de16550882ed8d (patch)
treede65aaa655d6c3d50d52c7c5db8607fc83a550a8 /src/libudev/libudev-enumerate.c
parentbuild-sys: support build-from-git without gobject-introspection (diff)
downloadsystemd-20bbd54f603994a3cc211d2795de16550882ed8d.tar.xz
systemd-20bbd54f603994a3cc211d2795de16550882ed8d.zip
udev: libudev - bump soname, remove deprecated functions, introduce symbol versions
Diffstat (limited to 'src/libudev/libudev-enumerate.c')
-rw-r--r--src/libudev/libudev-enumerate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
index 9e6f4677e5..671bfd7bcf 100644
--- a/src/libudev/libudev-enumerate.c
+++ b/src/libudev/libudev-enumerate.c
@@ -112,15 +112,15 @@ _public_ struct udev_enumerate *udev_enumerate_ref(struct udev_enumerate *udev_e
* Drop a reference of an enumeration context. If the refcount reaches zero,
* all resources of the enumeration context will be released.
**/
-_public_ void udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
+_public_ struct udev_enumerate *udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
{
unsigned int i;
if (udev_enumerate == NULL)
- return;
+ return NULL;
udev_enumerate->refcount--;
if (udev_enumerate->refcount > 0)
- return;
+ return udev_enumerate;
udev_list_cleanup(&udev_enumerate->sysattr_match_list);
udev_list_cleanup(&udev_enumerate->sysattr_nomatch_list);
udev_list_cleanup(&udev_enumerate->subsystem_match_list);
@@ -134,6 +134,7 @@ _public_ void udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
free(udev_enumerate->devices[i].syspath);
free(udev_enumerate->devices);
free(udev_enumerate);
+ return NULL;
}
/**