chiark / gitweb /
cgroup: IN_SET() FTW!
authorLennart Poettering <lennart@poettering.net>
Tue, 26 Sep 2017 20:49:09 +0000 (22:49 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 26 Sep 2017 20:49:09 +0000 (22:49 +0200)
src/core/cgroup.c

index d8470004d9bd10c7d28f9b485a693f7138469fb4..c0f07ca9a37655155d8e40a958e20e1a7c319235 100644 (file)
@@ -1885,7 +1885,7 @@ static int on_cgroup_inotify_event(sd_event_source *s, int fd, uint32_t revents,
 
                 l = read(fd, &buffer, sizeof(buffer));
                 if (l < 0) {
-                        if (errno == EINTR || errno == EAGAIN)
+                        if (IN_SET(errno, EINTR, EAGAIN))
                                 return 0;
 
                         return log_error_errno(errno, "Failed to read control group inotify events: %m");