From 7921ca6220827109829492737a51b1ca8839f881 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 2 Jun 2020 10:54:09 +0200 Subject: commands: tftp: drop unused variable The flags variables is not used. Drop it. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- commands/tftp.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'commands') 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; -- cgit v1.2.3 From 1c5ebfce0ce5d144341e187bd5c8ce447ceaf047 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 2 Jun 2020 10:54:10 +0200 Subject: commands: test: drop dead assignment last_expr is set to a different value few lines later. Drop the dead assignment. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- commands/test.c | 1 - 1 file changed, 1 deletion(-) (limited to 'commands') diff --git a/commands/test.c b/commands/test.c index 505b7c56b1..c845cec017 100644 --- a/commands/test.c +++ b/commands/test.c @@ -86,7 +86,6 @@ static int do_test(int argc, char *argv[]) if (argc < 2) return 1; - last_expr = 0; left = argc - 1; ap = argv + 1; -- cgit v1.2.3