From: Yu Watanabe Date: Thu, 29 Feb 2024 03:43:03 +0000 (+0900) Subject: ndisc-option: drop unused function X-Git-Tag: v256-rc1~539^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0216c672691168bbafb6ddd21af2f48c0e3520de;p=thirdparty%2Fsystemd.git ndisc-option: drop unused function --- diff --git a/src/libsystemd-network/ndisc-option.c b/src/libsystemd-network/ndisc-option.c index cddde0cabf0..380e71e7643 100644 --- a/src/libsystemd-network/ndisc-option.c +++ b/src/libsystemd-network/ndisc-option.c @@ -649,16 +649,6 @@ static const uint8_t prefix_length_code_to_prefix_length[_PREFIX_LENGTH_CODE_MAX [PREFIX_LENGTH_CODE_32] = 32, }; -int pref64_plc_to_prefix_length(uint16_t plc, uint8_t *ret) { - plc &= PREF64_PLC_MASK; - if (plc >= _PREFIX_LENGTH_CODE_MAX) - return -EINVAL; - - if (ret) - *ret = prefix_length_code_to_prefix_length[plc]; - return 0; -} - int pref64_prefix_length_to_plc(uint8_t prefixlen, uint8_t *ret) { for (size_t i = 0; i < ELEMENTSOF(prefix_length_code_to_prefix_length); i++) if (prefix_length_code_to_prefix_length[i] == prefixlen) { diff --git a/src/libsystemd-network/ndisc-option.h b/src/libsystemd-network/ndisc-option.h index 6e6a1ced632..45108ee1aa5 100644 --- a/src/libsystemd-network/ndisc-option.h +++ b/src/libsystemd-network/ndisc-option.h @@ -88,7 +88,6 @@ struct nd_opt_prefix64_info { uint8_t prefix[12]; } _packed_; -int pref64_plc_to_prefix_length(uint16_t plc, uint8_t *ret); int pref64_prefix_length_to_plc(uint8_t prefixlen, uint8_t *ret); sd_ndisc_option* ndisc_option_free(sd_ndisc_option *option);