summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-10-11 20:23:04 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-10-11 20:23:23 +0200
commitc1316cd00d73e2a2ec8e9f84512edabd6b970cfa (patch)
treeb4e1e1160eb2039f71aa32210bf5885a5c6d48dd
parenthwdb: fix key toggle touchpad and programmable buttom for Positivo V142N (#34... (diff)
downloadsystemd-c1316cd00d73e2a2ec8e9f84512edabd6b970cfa.tar.xz
systemd-c1316cd00d73e2a2ec8e9f84512edabd6b970cfa.zip
in-addr-util: rename in_addr_prefix_from_string_auto_internal() -> _full()
The function is also used in other source files. Hence, not internal. No functional change, just refactoring.
-rw-r--r--src/basic/in-addr-util.c2
-rw-r--r--src/basic/in-addr-util.h4
-rw-r--r--src/network/networkd-address.c2
-rw-r--r--src/test/test-in-addr-util.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/basic/in-addr-util.c b/src/basic/in-addr-util.c
index c077f0aa7d..fa28d79dcb 100644
--- a/src/basic/in-addr-util.c
+++ b/src/basic/in-addr-util.c
@@ -890,7 +890,7 @@ int in_addr_prefix_from_string(
return 0;
}
-int in_addr_prefix_from_string_auto_internal(
+int in_addr_prefix_from_string_auto_full(
const char *p,
InAddrPrefixLenMode mode,
int *ret_family,
diff --git a/src/basic/in-addr-util.h b/src/basic/in-addr-util.h
index 9cd0aca9a4..2efe9aec01 100644
--- a/src/basic/in-addr-util.h
+++ b/src/basic/in-addr-util.h
@@ -181,9 +181,9 @@ typedef enum InAddrPrefixLenMode {
PREFIXLEN_REFUSE, /* Fail with -ENOANO if prefixlen is not specified. */
} InAddrPrefixLenMode;
-int in_addr_prefix_from_string_auto_internal(const char *p, InAddrPrefixLenMode mode, int *ret_family, union in_addr_union *ret_prefix, unsigned char *ret_prefixlen);
+int in_addr_prefix_from_string_auto_full(const char *p, InAddrPrefixLenMode mode, int *ret_family, union in_addr_union *ret_prefix, unsigned char *ret_prefixlen);
static inline int in_addr_prefix_from_string_auto(const char *p, int *ret_family, union in_addr_union *ret_prefix, unsigned char *ret_prefixlen) {
- return in_addr_prefix_from_string_auto_internal(p, PREFIXLEN_FULL, ret_family, ret_prefix, ret_prefixlen);
+ return in_addr_prefix_from_string_auto_full(p, PREFIXLEN_FULL, ret_family, ret_prefix, ret_prefixlen);
}
static inline size_t FAMILY_ADDRESS_SIZE(int family) {
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 7807d83c5a..aaa9d16fe3 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -2089,7 +2089,7 @@ static int config_parse_address(
assert(rvalue);
/* Address=address/prefixlen */
- r = in_addr_prefix_from_string_auto_internal(rvalue, PREFIXLEN_REFUSE, &f, &buffer, &prefixlen);
+ r = in_addr_prefix_from_string_auto_full(rvalue, PREFIXLEN_REFUSE, &f, &buffer, &prefixlen);
if (r == -ENOANO) {
r = in_addr_prefix_from_string_auto(rvalue, &f, &buffer, &prefixlen);
if (r >= 0)
diff --git a/src/test/test-in-addr-util.c b/src/test/test-in-addr-util.c
index fcc9a0a72d..769cb8f083 100644
--- a/src/test/test-in-addr-util.c
+++ b/src/test/test-in-addr-util.c
@@ -36,7 +36,7 @@ static void test_in_addr_prefix_from_string_one(
assert_se(in_addr_equal(family, &q, u));
assert_se(l == prefixlen);
- r = in_addr_prefix_from_string_auto_internal(p, PREFIXLEN_REFUSE, &f, &q, &l);
+ r = in_addr_prefix_from_string_auto_full(p, PREFIXLEN_REFUSE, &f, &q, &l);
assert_se(r == ret_refuse);
if (r >= 0) {