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/libsystemd-network | |
parent | 3742095b27f8df4b195d530b52d15bc5fea70bf1 (diff) | |
download | systemd-ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359.tar.gz |
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/libsystemd-network')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 25cff849e5..d0ce7989d8 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -455,9 +455,7 @@ int sd_dhcp_client_set_mtu(sd_dhcp_client *client, uint32_t mtu) { int sd_dhcp_client_get_lease(sd_dhcp_client *client, sd_dhcp_lease **ret) { assert_return(client, -EINVAL); - if (client->state != DHCP_STATE_BOUND && - client->state != DHCP_STATE_RENEWING && - client->state != DHCP_STATE_REBINDING) + if (!IN_SET(client->state, DHCP_STATE_BOUND, DHCP_STATE_RENEWING, DHCP_STATE_REBINDING)) return -EADDRNOTAVAIL; if (ret) |