diff options
| author | Tom Rini <trini@konsulko.com> | 2025-05-15 17:31:30 -0600 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2025-05-29 08:30:24 -0600 |
| commit | 05f6f6e8c76c68a36125ec7a6af911ee9418bc99 (patch) | |
| tree | b15690ea1e577add0fd352cc3756ce51d1724075 /include/net-common.h | |
| 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 <trini@konsulko.com>
Diffstat (limited to 'include/net-common.h')
| -rw-r--r-- | include/net-common.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/include/net-common.h b/include/net-common.h index e536968a92b..2ca565fe4ed 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -456,19 +456,6 @@ void net_process_received_packet(uchar *in_packet, int len); */ int update_tftp(ulong addr, char *interface, char *devstring); -/** - * env_get_ip() - Convert an environment value to an ip address - * - * @var: Environment variable to convert. The value of this variable must be - * in the format a.b.c.d, where each value is a decimal number from - * 0 to 255 - * Return: IP address, or 0 if invalid - */ -static inline struct in_addr env_get_ip(char *var) -{ - return string_to_ip(env_get(var)); -} - int net_init(void); /* Called when a network operation fails to know if it should be re-tried */ |
