diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-08 17:37:29 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-08 17:37:29 +0200 |
commit | e69c281ad25ea0d4db5ab06bb82967332b00e55f (patch) | |
tree | 2bab3dcf4c756861e8aeb2ac7a1508a05a6044e9 /src/libsystemd-network/sd-dhcp-client.c | |
parent | sd-dhcp-client: make return arguments for sd_dhcp_client_get_client_id() opti... (diff) | |
download | systemd-e69c281ad25ea0d4db5ab06bb82967332b00e55f.tar.xz systemd-e69c281ad25ea0d4db5ab06bb82967332b00e55f.zip |
sd-dhcp-client: do not use implicit cast to boolean
Diffstat (limited to '')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 19ed80db5c..4bce35b3a4 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -1477,7 +1477,7 @@ static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer, size_ if (r < 0) return r; - if (client->client_id_len) { + if (client->client_id_len > 0) { r = dhcp_lease_set_client_id(lease, (uint8_t *) &client->client_id, client->client_id_len); @@ -1571,7 +1571,7 @@ static int client_handle_ack(sd_dhcp_client *client, DHCPMessage *ack, size_t le if (r < 0) return r; - if (client->client_id_len) { + if (client->client_id_len > 0) { r = dhcp_lease_set_client_id(lease, (uint8_t *) &client->client_id, client->client_id_len); |