diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-06-25 23:41:33 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-06-27 17:05:14 +0200 |
commit | 32861b4c763d8d228e4980cda32e51706dd9e081 (patch) | |
tree | 5ae7dd65f9675dd08835e85b33574e97a510de00 /src | |
parent | po: add a false positive to POTFILES.skip (diff) | |
download | systemd-32861b4c763d8d228e4980cda32e51706dd9e081.tar.xz systemd-32861b4c763d8d228e4980cda32e51706dd9e081.zip |
sd-event: use LIST_IS_EMPTY()
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index e5d370d4f3..78b4351c2a 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1799,7 +1799,7 @@ static void event_free_inode_data( if (!d) return; - assert(!d->event_sources); + assert(LIST_IS_EMPTY(d->event_sources)); if (d->fd >= 0) { LIST_REMOVE(to_close, e->inode_data_to_close, d); @@ -1862,7 +1862,7 @@ static void event_gc_inode_data( if (!d) return; - if (d->event_sources) + if (!LIST_IS_EMPTY(d->event_sources)) return; inotify_data = d->inotify_data; @@ -3954,7 +3954,7 @@ static int process_epoll(sd_event *e, usec_t timeout, int64_t threshold, int64_t n_event_max = MALLOC_ELEMENTSOF(e->event_queue); /* If we still have inotify data buffered, then query the other fds, but don't wait on it */ - if (e->inotify_data_buffered) + if (!LIST_IS_EMPTY(e->inotify_data_buffered)) timeout = 0; for (;;) { |