diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-12-21 15:56:36 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-22 10:08:09 +0100 |
commit | 3fada2bcedf668f9d2eca1971bb8a225dc03f645 (patch) | |
tree | f252be9fe00d8f373093076b0f33df0dfa77e30c /commands | |
parent | bd8397e8929ad17082c8812af4bd2d9d5b639115 (diff) | |
download | barebox-3fada2bcedf668f9d2eca1971bb8a225dc03f645.tar.gz barebox-3fada2bcedf668f9d2eca1971bb8a225dc03f645.tar.xz |
command: flash: remove broken filename check
It makes no sense to check the filename pointer here, because a) we have
already been using it and b) argc has been tested against 1 already, so
argv[1] should not be NULL. So, drop the checks.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/flash.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/commands/flash.c b/commands/flash.c index a3f3508f2f..85efd06e43 100644 --- a/commands/flash.c +++ b/commands/flash.c @@ -56,11 +56,6 @@ static int do_flerase(struct command *cmdtp, int argc, char *argv[]) size = s.st_size; - if (!filename) { - printf("missing filename\n"); - return 1; - } - fd = open(filename, O_WRONLY); if (fd < 0) { printf("open %s: %s", filename, errno_str()); @@ -132,11 +127,6 @@ static int do_protect(struct command *cmdtp, int argc, char *argv[]) size = s.st_size; - if (!filename) { - printf("missing filename\n"); - return 1; - } - fd = open(filename, O_WRONLY); if (fd < 0) { printf("open %s: %s", filename, errno_str()); |