Skip to content
Browse files

[COMMANDS] vfs: Fix parameter parsing for guest_load sub-command

This patch fixes issues "CID 1170862 Logically dead code" reported
by coverity scan.

Signed-off-by: Anup Patel <anup@brainfault.org>
  • Loading branch information...
1 parent 71152e5 commit 9b921c91cacc99e62c4ba654bddcced5116d69c7 @avpatel avpatel committed Feb 11, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 commands/cmd_vfs.c
View
4 commands/cmd_vfs.c
@@ -698,8 +698,8 @@ static int cmd_vfs_exec(struct vmm_chardev *cdev, int argc, char **argv)
return VMM_ENOTAVAIL;
}
pa = (physical_addr_t)strtoull(argv[3], NULL, 0);
- off = (argc > 4) ? strtoul(argv[5], NULL, 0) : 0;
- len = (argc > 5) ? strtoul(argv[6], NULL, 0) : 0xFFFFFFFF;
+ off = (argc > 5) ? strtoul(argv[5], NULL, 0) : 0;
+ len = (argc > 6) ? strtoul(argv[6], NULL, 0) : 0xFFFFFFFF;
return cmd_vfs_load(cdev, guest, pa, argv[4], off, len);
} else if ((strcmp(argv[1], "guest_load_list") == 0) && (argc == 4)) {
guest = vmm_manager_guest_find(argv[2]);

0 comments on commit 9b921c9

Please sign in to comment.
Something went wrong with that request. Please try again.