diff options
| author | Tom Rini <[email protected]> | 2025-05-15 17:31:30 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-05-29 08:30:24 -0600 |
| commit | 05f6f6e8c76c68a36125ec7a6af911ee9418bc99 (patch) | |
| tree | b15690ea1e577add0fd352cc3756ce51d1724075 /net | |
| parent | 5b82721337e271609419dce490884392085d8d1f (diff) | |
net: Remove env_get_ip helper() function
Currently, we have the function env_get_ip which takes an IP address
in string form and returns a struct in_addr representation of that
address. It is however little used and means that a number of places
indirectly (and unclearly) get <env.h> via <net.h>. To clean this up
start by replacing env_get_ip() calls with string_to_ip() calls. This is
generally a no-op as env_get_ip(str) is an inline of
string_to_ip(env_get(str)) but in a few cases we can or already have
stored the result of env_get(str) and can save the additional call.
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'net')
| -rw-r--r-- | net/link_local.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/link_local.c b/net/link_local.c index 179721333ff..f6425ff3df2 100644 --- a/net/link_local.c +++ b/net/link_local.c @@ -106,7 +106,7 @@ static void configure_wait(void) void link_local_start(void) { - ip = env_get_ip("llipaddr"); + ip = string_to_ip(env_get("llipaddr")); if (ip.s_addr != 0 && (ntohl(ip.s_addr) & IN_CLASSB_NET) != LINKLOCAL_ADDR) { puts("invalid link address"); |
