projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d1af2a
)
cmd: ubi: remove unreachable code
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sun, 6 Jan 2019 11:26:28 +0000
(12:26 +0100)
committer
Tom Rini
<trini@konsulko.com>
Tue, 15 Jan 2019 20:28:44 +0000
(15:28 -0500)
It does not make sense to check if argc < 2 a second time, especially after
accessing argv[1].
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
cmd/ubi.c
patch
|
blob
|
history
diff --git
a/cmd/ubi.c
b/cmd/ubi.c
index a12ac703ebe54ffe840d0452589f16ee2fe1ff20..c511a2fb7601f8d49b2a4353b48f289f04d23770 100644
(file)
--- a/
cmd/ubi.c
+++ b/
cmd/ubi.c
@@
-472,12
+472,8
@@
static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (argc < 2)
return CMD_RET_USAGE;
- if (strcmp(argv[1], "detach") == 0) {
- if (argc < 2)
- return CMD_RET_USAGE;
-
+ if (strcmp(argv[1], "detach") == 0)
return ubi_detach();
- }
if (strcmp(argv[1], "part") == 0) {
const char *vid_header_offset = NULL;