]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/socket-proxy/socket-proxyd.c
tree-wide: use IN_SET macro (#6977)
[thirdparty/systemd.git] / src / socket-proxy / socket-proxyd.c
index bf8c2f86a3460df9ab9d301f07a8deb48238d231..34c938438cb235ca5ac6fb17ce989bb411c2fde4 100644 (file)
@@ -164,7 +164,7 @@ static int connection_shovel(
                         if (z > 0) {
                                 *full += z;
                                 shoveled = true;
-                        } else if (z == 0 || errno == EPIPE || errno == ECONNRESET) {
+                        } else if (z == 0 || IN_SET(errno, EPIPE, ECONNRESET)) {
                                 *from_source = sd_event_source_unref(*from_source);
                                 *from = safe_close(*from);
                         } else if (!IN_SET(errno, EAGAIN, EINTR))
@@ -176,7 +176,7 @@ static int connection_shovel(
                         if (z > 0) {
                                 *full -= z;
                                 shoveled = true;
-                        } else if (z == 0 || errno == EPIPE || errno == ECONNRESET) {
+                        } else if (z == 0 || IN_SET(errno, EPIPE, ECONNRESET)) {
                                 *to_source = sd_event_source_unref(*to_source);
                                 *to = safe_close(*to);
                         } else if (!IN_SET(errno, EAGAIN, EINTR))