summaryrefslogtreecommitdiffstats
path: root/commands/tftp.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-11 16:52:10 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-15 12:21:45 +0200
commit947fb5adf8af450507c978abf1c7ec9f051e5842 (patch)
treeaf790669292308b56baf188611ac430012037cba /commands/tftp.c
parent48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff)
downloadbarebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.gz
string: Fix (v)asprintf prototypes
Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/tftp.c')
-rw-r--r--commands/tftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/tftp.c b/commands/tftp.c
index 8a3b541..6a3121a 100644
--- a/commands/tftp.c
+++ b/commands/tftp.c
@@ -58,10 +58,10 @@ static int do_tftpb(int argc, char *argv[])
dest = argv[optind];
if (tftp_push) {
- dest = freep = asprintf("%s/%s", TFTP_MOUNT_PATH, dest);
+ dest = freep = basprintf("%s/%s", TFTP_MOUNT_PATH, dest);
flags = O_RDONLY;
} else {
- source = freep = asprintf("%s/%s", TFTP_MOUNT_PATH, source);
+ source = freep = basprintf("%s/%s", TFTP_MOUNT_PATH, source);
flags = O_WRONLY | O_CREAT;
}