From d60230bded854fe5a357c77038cf6089defcfd24 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 15 Sep 2016 12:51:27 +0200 Subject: convert users to %pI4 Convert users of ip_to_string() and print_IPaddr() to %pI4 and remove the now unused functions. Signed-off-by: Sascha Hauer --- commands/tftp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'commands/tftp.c') diff --git a/commands/tftp.c b/commands/tftp.c index 6a3121ad56..08366b476f 100644 --- a/commands/tftp.c +++ b/commands/tftp.c @@ -36,6 +36,7 @@ static int do_tftpb(int argc, char *argv[]) int tftp_push = 0; int ret; IPaddr_t ip; + char ip4_str[sizeof("255.255.255.255")]; while ((opt = getopt(argc, argv, "p")) > 0) { switch(opt) { @@ -73,7 +74,8 @@ static int do_tftpb(int argc, char *argv[]) goto err_free; ip = net_get_serverip(); - ret = mount(ip_to_string(ip), "tftp", TFTP_MOUNT_PATH, NULL); + sprintf(ip4_str, "%pI4", &ip); + ret = mount(ip4_str, "tftp", TFTP_MOUNT_PATH, NULL); if (ret) goto err_rmdir; -- cgit v1.2.3