diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-09 00:27:22 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-09 00:27:24 +0900 |
commit | 22e299fc5e4380fffa2823a6061d7360ce9031ab (patch) | |
tree | 44f6f806741118151c9a44a29b36631e5d45150e | |
parent | 16cda99c737714d6d259e45808e39f94408d90bd (diff) | |
download | systemd-22e299fc5e4380fffa2823a6061d7360ce9031ab.tar.gz |
sd-dhcp-client: drop redundant condition
Closes #27561.
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index f207cf0c1e..b73abcb82d 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -828,14 +828,12 @@ static int client_message_init( /* Some DHCP servers will refuse to issue an DHCP lease if the Client Identifier option is not set */ - if (client->client_id_len) { - r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0, - SD_DHCP_OPTION_CLIENT_IDENTIFIER, - client->client_id_len, - &client->client_id); - if (r < 0) - return r; - } + r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0, + SD_DHCP_OPTION_CLIENT_IDENTIFIER, + client->client_id_len, + &client->client_id); + if (r < 0) + return r; /* RFC2131 section 3.5: in its initial DHCPDISCOVER or DHCPREQUEST message, a |