]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ndisc-option: drop unused function
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 29 Feb 2024 03:43:03 +0000 (12:43 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Mar 2024 03:32:52 +0000 (12:32 +0900)
src/libsystemd-network/ndisc-option.c
src/libsystemd-network/ndisc-option.h

index cddde0cabf0e72df34f1fa842b71aaf28e1a3c76..380e71e76433870d1a7a0f85efb7b0d9d8dc78a3 100644 (file)
@@ -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) {
index 6e6a1ced63271aea8a696f8d01fb5e8e042fa9fe..45108ee1aa58f93a2ef4521c9ee7d9ccdc9330ba 100644 (file)
@@ -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);