diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2017-09-29 09:58:22 +0200 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2017-10-02 13:09:56 +0200 |
commit | ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359 (patch) | |
tree | 2be64c5b07a1c2cde8c2244a78b5e4c5e125e4b9 /src/socket-proxy | |
parent | tree-wide: use IN_SET where possible (diff) | |
download | systemd-ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359.tar.xz systemd-ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359.zip |
tree-wide: use `!IN_SET(..)` for `a != b && a != c && …`
The included cocci was used to generate the changes.
Thanks to @flo-wer for pointing this case out.
Diffstat (limited to 'src/socket-proxy')
-rw-r--r-- | src/socket-proxy/socket-proxyd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c index 1b99b7bc82..bf8c2f86a3 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -167,7 +167,7 @@ static int connection_shovel( } else if (z == 0 || errno == EPIPE || errno == ECONNRESET) { *from_source = sd_event_source_unref(*from_source); *from = safe_close(*from); - } else if (errno != EAGAIN && errno != EINTR) + } else if (!IN_SET(errno, EAGAIN, EINTR)) return log_error_errno(errno, "Failed to splice: %m"); } @@ -179,7 +179,7 @@ static int connection_shovel( } else if (z == 0 || errno == EPIPE || errno == ECONNRESET) { *to_source = sd_event_source_unref(*to_source); *to = safe_close(*to); - } else if (errno != EAGAIN && errno != EINTR) + } else if (!IN_SET(errno, EAGAIN, EINTR)) return log_error_errno(errno, "Failed to splice: %m"); } } while (shoveled); |