From f6577968a2f86aade8fff503a53fa52a7245251a Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 24 Apr 2011 00:36:22 +0200 Subject: [PATCH] libudev: queue - _unref() should return the object --- libudev/libudev-private.h | 2 +- libudev/libudev-queue-private.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h index dbe7fd17..2fcfe413 100644 --- a/libudev/libudev-private.h +++ b/libudev/libudev-private.h @@ -201,7 +201,7 @@ ssize_t udev_queue_skip_devpath(FILE *queue_file); /* libudev-queue-private.c */ struct udev_queue_export *udev_queue_export_new(struct udev *udev); -void udev_queue_export_unref(struct udev_queue_export *udev_queue_export); +struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export *udev_queue_export); void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export); int udev_queue_export_device_queued(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device); int udev_queue_export_device_finished(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device); diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c index 2f1afecb..a799be06 100644 --- a/libudev/libudev-queue-private.c +++ b/libudev/libudev-queue-private.c @@ -90,13 +90,14 @@ struct udev_queue_export *udev_queue_export_new(struct udev *udev) return udev_queue_export; } -void udev_queue_export_unref(struct udev_queue_export *udev_queue_export) +struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export *udev_queue_export) { if (udev_queue_export == NULL) - return; + return NULL; if (udev_queue_export->queue_file != NULL) fclose(udev_queue_export->queue_file); free(udev_queue_export); + return NULL; } void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export) -- 2.39.5