diff --git a/commands/tftp.c b/commands/tftp.c index 1569819..48ff00c 100644 --- a/commands/tftp.c +++ b/commands/tftp.c @@ -20,7 +20,6 @@ { char *source, *dest, *freep; int opt; - unsigned long flags; int tftp_push = 0; int ret; IPaddr_t ip; @@ -46,13 +45,10 @@ 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;