[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH 2/3] remove unused variable opts
From: Manuel Zerpies <manuel.f.zerpies () ww ! stud ! uni-erlangen ! de>
Date: 2012-08-01 13:27:31
Message-ID: 20120801132731.GB17419 () ww ! stud ! uni-erlangen ! de
[Download RAW message or body]
The variable "unsigned opts" is not used. It saves an necessary
call to getopts32().
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
Hi,
maybe this patch is better. It calls getopts32() and doesn't ignore the
options given by the user.
I tested it and Michael is right at this point.
Greets,
Manuel
miscutils/flashcp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c
index 790f9c0..b573425 100644
--- a/miscutils/flashcp.c
+++ b/miscutils/flashcp.c
@@ -50,7 +50,6 @@ int flashcp_main(int argc UNUSED_PARAM, char **argv)
int fd_f, fd_d; /* input file and mtd device file descriptors */
int i;
uoff_t erase_count;
- unsigned opts;
struct mtd_info_user mtd;
struct erase_info_user e;
struct stat statb;
@@ -59,7 +58,7 @@ int flashcp_main(int argc UNUSED_PARAM, char **argv)
RESERVE_CONFIG_UBUFFER(buf2, BUFSIZE);
opt_complementary = "=2"; /* exactly 2 non-option args: file, dev */
- opts = getopt32(argv, "v");
+ getopt32(argv, "v");
argv += optind;
// filename = *argv++;
// devicename = *argv;
--
1.7.10
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic