sd-dhcp6-client: constify one argument
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Sep 2021 05:57:29 +0000 (14:57 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Jan 2022 17:17:52 +0000 (18:17 +0100)
(cherry picked from commit dc95e21d33708e807d3e5872af428383aac3f9b7)

src/libsystemd-network/dhcp6-internal.h
src/libsystemd-network/dhcp6-option.c

index 35cafc96ec9cd93f66b33100f8b0cde2a530879e..96d7de8cae2b8cc548c4982cc8d560dc6f4b673a 100644 (file)
@@ -105,7 +105,7 @@ int dhcp6_option_parse(uint8_t **buf, size_t *buflen, uint16_t *optcode,
                        size_t *optlen, uint8_t **optvalue);
 int dhcp6_option_parse_status(DHCP6Option *option, size_t len);
 int dhcp6_option_parse_ia(sd_dhcp6_client *client, DHCP6Option *iaoption, be32_t iaid, DHCP6IA *ia, uint16_t *ret_status_code);
-int dhcp6_option_parse_ip6addrs(uint8_t *optval, uint16_t optlen,
+int dhcp6_option_parse_ip6addrs(const uint8_t *optval, uint16_t optlen,
                                 struct in6_addr **addrs, size_t count);
 int dhcp6_option_parse_domainname_list(const uint8_t *optval, uint16_t optlen,
                                        char ***str_arr);
index 34d7e997dd51c2e0b9533d187db58fca43f0ff63..0709cfd4fde8147f504981bef5d756a91bd6e29b 100644 (file)
@@ -707,7 +707,7 @@ int dhcp6_option_parse_ia(
         return 1;
 }
 
-int dhcp6_option_parse_ip6addrs(uint8_t *optval, uint16_t optlen,
+int dhcp6_option_parse_ip6addrs(const uint8_t *optval, uint16_t optlen,
                                 struct in6_addr **addrs, size_t count) {
 
         if (optlen == 0 || optlen % sizeof(struct in6_addr) != 0)