sd-dhcp6-client: shorten code a bit

This commit is contained in:
Yu Watanabe
2021-11-01 23:13:08 +09:00
parent 4f81f0d241
commit 65457c17e6
+1 -2
View File
@@ -1168,8 +1168,7 @@ static int client_parse_message(
break;
case SD_DHCP6_OPTION_SERVERID:
r = dhcp6_lease_get_serverid(lease, NULL, NULL);
if (r >= 0)
if (dhcp6_lease_get_serverid(lease, NULL, NULL) >= 0)
return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "%s contains multiple server IDs",
dhcp6_message_type_to_string(message->type));