diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-11 14:44:03 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-11 14:44:03 +0900 |
commit | ce088d6fb4a6363106e4b94ad749d3bce61aefc7 (patch) | |
tree | c67a21689aedd967fd742a3af1cebba61a2f24e1 /src/libsystemd-network/sd-dhcp-lease.c | |
parent | 509685f91aadf6bc56c8298a40d4879494e4e3fe (diff) | |
download | systemd-ce088d6fb4a6363106e4b94ad749d3bce61aefc7.tar.gz |
sd-dhcp: drop deserialize_dhcp_option() as it is equivalent to unhexmem()
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-lease.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-lease.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c index c4670503cc..ed951aeb7d 100644 --- a/src/libsystemd-network/sd-dhcp-lease.c +++ b/src/libsystemd-network/sd-dhcp-lease.c @@ -1193,13 +1193,13 @@ int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) { } if (client_id_hex) { - r = deserialize_dhcp_option(&lease->client_id, &lease->client_id_len, client_id_hex); + r = unhexmem(client_id_hex, (size_t) -1, &lease->client_id, &lease->client_id_len); if (r < 0) log_debug_errno(r, "Failed to parse client ID %s, ignoring: %m", client_id_hex); } if (vendor_specific_hex) { - r = deserialize_dhcp_option(&lease->vendor_specific, &lease->vendor_specific_len, vendor_specific_hex); + r = unhexmem(vendor_specific_hex, (size_t) -1, &lease->vendor_specific, &lease->vendor_specific_len); if (r < 0) log_debug_errno(r, "Failed to parse vendor specific data %s, ignoring: %m", vendor_specific_hex); } @@ -1211,7 +1211,7 @@ int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) { if (!options[i]) continue; - r = deserialize_dhcp_option(&data, &len, options[i]); + r = unhexmem(options[i], (size_t) -1, &data, &len); if (r < 0) { log_debug_errno(r, "Failed to parse private DHCP option %s, ignoring: %m", options[i]); continue; |