X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flibudev%2Flibudev-queue.c;h=f67dba99584ab2dad1f74a7629924fcf14c144e5;hp=08d52ab1f1b4c5a481f9e1c3d7b7157bbbc80284;hb=051dfe8708e394a64e8ef6c281228763481ad32c;hpb=f274ece0f76b5709408821e317e87aef76123db6 diff --git a/src/libudev/libudev-queue.c b/src/libudev/libudev-queue.c index 08d52ab1f..f67dba995 100644 --- a/src/libudev/libudev-queue.c +++ b/src/libudev/libudev-queue.c @@ -101,7 +101,7 @@ _public_ struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue) * Drop a reference of a udev queue context. If the refcount reaches zero, * the resources of the queue context will be released. * - * Returns: the passed queue context if it has still an active reference, or #NULL otherwise. + * Returns: #NULL **/ _public_ struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue) { @@ -109,7 +109,7 @@ _public_ struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue) return NULL; udev_queue->refcount--; if (udev_queue->refcount > 0) - return udev_queue; + return NULL; udev_list_cleanup(&udev_queue->queue_list); free(udev_queue); return NULL; @@ -458,7 +458,7 @@ _public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_qu snprintf(seqnum_str, sizeof(seqnum_str), "%llu", seqnum); s = syspath; - l = util_strpcpy(&s, sizeof(syspath), "/sys"); + l = strpcpy(&s, sizeof(syspath), "/sys"); len = udev_queue_read_devpath(queue_file, s, l); if (len < 0) break; @@ -467,7 +467,7 @@ _public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_qu udev_list_entry_add(&udev_queue->queue_list, syspath, seqnum_str); } else { udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_queue->queue_list)) { - if (strcmp(seqnum_str, udev_list_entry_get_value(list_entry)) == 0) { + if (streq(seqnum_str, udev_list_entry_get_value(list_entry))) { udev_list_entry_delete(list_entry); break; }