summaryrefslogtreecommitdiffstats
path: root/commands/tftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/tftp.c')
-rw-r--r--commands/tftp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/commands/tftp.c b/commands/tftp.c
index 1569819844..48ff00c621 100644
--- a/commands/tftp.c
+++ b/commands/tftp.c
@@ -20,7 +20,6 @@ static int do_tftpb(int argc, char *argv[])
{
char *source, *dest, *freep;
int opt;
- unsigned long flags;
int tftp_push = 0;
int ret;
IPaddr_t ip;
@@ -46,13 +45,10 @@ static int do_tftpb(int argc, char *argv[])
else
dest = argv[optind];
- if (tftp_push) {
+ if (tftp_push)
dest = freep = basprintf("%s/%s", TFTP_MOUNT_PATH, dest);
- flags = O_RDONLY;
- } else {
+ else
source = freep = basprintf("%s/%s", TFTP_MOUNT_PATH, source);
- flags = O_WRONLY | O_CREAT;
- }
if (!freep)
return -ENOMEM;