]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp6-client: shorten code a bit
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 1 Nov 2021 05:10:35 +0000 (14:10 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 1 Nov 2021 14:13:08 +0000 (23:13 +0900)
src/libsystemd-network/sd-dhcp6-client.c

index 91e3d7642d95759c53222cea7804aebaae2a7085..6562ebd21c5766b0425f9ff8914ab1d6da6464c7 100644 (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));