summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-04-15 14:58:15 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-15 15:05:38 +0200
commit9d699b790cfc3afa6766a1d047def724cc42386e (patch)
tree598916fa36ae96b851e20e6543d7912a5db0ac28 /lib
parent3f732effd575831a21708dd8a4e2161a4f411f71 (diff)
downloadbarebox-9d699b790cfc3afa6766a1d047def724cc42386e.tar.gz
barebox-9d699b790cfc3afa6766a1d047def724cc42386e.tar.xz
net: use static string in string_to_ip
Simplify usage of ip_to_string by using a static string. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/parameter.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/parameter.c b/lib/parameter.c
index 379a0577ed..5a7ae1a3cf 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -74,11 +74,7 @@ IPaddr_t dev_get_param_ip(struct device_d *dev, char *name)
int dev_set_param_ip(struct device_d *dev, char *name, IPaddr_t ip)
{
- char ipstr[sizeof("xxx.xxx.xxx.xxx")];
-
- ip_to_string(ip, ipstr);
-
- return dev_set_param(dev, name, ipstr);
+ return dev_set_param(dev, name, ip_to_string(ip));
}
#endif