From 20bbd54f603994a3cc211d2795de16550882ed8d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 15 May 2012 22:57:58 +0200 Subject: udev: libudev - bump soname, remove deprecated functions, introduce symbol versions --- src/libudev/libudev-enumerate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libudev/libudev-enumerate.c') 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; } /** -- cgit v1.2.3