]> err.no Git - systemd/commitdiff
libudev: queue - _unref() should return the object
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 23 Apr 2011 22:36:22 +0000 (00:36 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 23 Apr 2011 22:36:22 +0000 (00:36 +0200)
libudev/libudev-private.h
libudev/libudev-queue-private.c

index dbe7fd17fc5c12670b9542290f263cee0baf4939..2fcfe4131c03a30f62996dbf9eb00ab59fc5ba05 100644 (file)
@@ -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);
index 2f1afecb298197b8c48c6b1853c2bc7ace3cbfb1..a799be062a961aa8829d97133456b5910dacc4ad 100644 (file)
@@ -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)