summaryrefslogtreecommitdiffstats
path: root/net/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/net.c b/net/net.c
index df1d677ba6..3c0e715601 100644
--- a/net/net.c
+++ b/net/net.c
@@ -78,9 +78,9 @@ IPaddr_t getenv_ip(const char *name)
int setenv_ip(const char *name, IPaddr_t ip)
{
- const char *str;
+ char str[sizeof("255.255.255.255")];
- str = ip_to_string(ip);
+ sprintf(str, "%pI4", &ip);
setenv(name, str);