[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH 2/3] remove unused variable opts
From: Michael Tokarev <mjt () tls ! msk ! ru>
Date: 2012-07-31 13:27:20
Message-ID: 5017DD38.7060904 () msgid ! tls ! msk ! ru
[Download RAW message or body]
31.07.2012 17:15, manuel.f.zerpies@ww.stud.uni-erlangen.de wrote:
> From: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
>
> The variable "unsigned opts" is not used. Saves an unnecessary call to
> getopt32().
>
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
> ---
> miscutils/flashcp.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c
> index 790f9c0..47d1189 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,6 @@ 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");
Before the change, the command accepted but ignored -v option, (maybe)
handled --help, rejected (with error message) all other options, and
required exactly 2 non-option arguments. All this is now gone. I'm
not sure at all this is right change.
Thanks,
/mjt
_______________________________________________
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