summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-queue.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-01-28 22:49:17 +0100
committerMichael Biebl <biebl@debian.org>2018-01-28 22:49:17 +0100
commit1d42b86df9052528a8f56b2f52d8bc2faf87b2da (patch)
tree0d80f37a1ad6f02067261ee3e7ee62e1869fcd56 /src/libudev/libudev-queue.c
parent52ad194e0b816b8273dd8d0fea3e6d467f6ca34e (diff)
downloadsystemd-1d42b86df9052528a8f56b2f52d8bc2faf87b2da.tar.gz
New upstream version 237
Diffstat (limited to 'src/libudev/libudev-queue.c')
-rw-r--r--src/libudev/libudev-queue.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libudev/libudev-queue.c b/src/libudev/libudev-queue.c
index b941afb773..85ceb263a3 100644
--- a/src/libudev/libudev-queue.c
+++ b/src/libudev/libudev-queue.c
@@ -268,8 +268,16 @@ _public_ int udev_queue_get_fd(struct udev_queue *udev_queue) {
* Returns: the result of clearing the watch for queue changes.
*/
_public_ int udev_queue_flush(struct udev_queue *udev_queue) {
+ int r;
+
+ assert(udev_queue);
+
if (udev_queue->fd < 0)
return -EINVAL;
- return flush_fd(udev_queue->fd);
+ r = flush_fd(udev_queue->fd);
+ if (r < 0)
+ return r;
+
+ return 0;
}