aboutsummaryrefslogtreecommitdiff
path: root/cmd/efidebug.c
diff options
context:
space:
mode:
authorAKASHI Takahiro2020-05-08 14:50:47 +0900
committerHeinrich Schuchardt2020-05-09 09:30:27 +0200
commitd67591dc22f9a6d41163fb6ba0efce5fa0598830 (patch)
treeac8e83658e22f430d4149c943282194b4b34c50d /cmd/efidebug.c
parentb433acbb819e1546ef9493dc3ba97a44b398a9db (diff)
cmd: efidebug: fix a wrong handling of arguments
Coverity detected a dead code, but actually there is a bug in a check against a number of arguments. So simply fix it. Reported-by: Coverity (CID 300330) Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd/efidebug.c')
-rw-r--r--cmd/efidebug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index d8a76d78a38..5e3bf16573d 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -602,7 +602,7 @@ static int do_efi_boot_add(cmd_tbl_t *cmdtp, int flag,
+ sizeof(struct efi_device_path); /* for END */
/* optional data */
- if (argc < 6)
+ if (argc == 6)
lo.optional_data = NULL;
else
lo.optional_data = (const u8 *)argv[6];