Skip to content

Commit

Permalink
Reverted the last comparison changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rutgerhendriks committed Jul 19, 2020
1 parent f57ae0c commit 2dd47a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/st-flash/flash_opts.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,18 +242,18 @@ int flash_get_opts(struct flash_opts* o, int ac, char** av) {
// command and (optional) device name
while (ac >= 1) {
if (strcmp(av[0], "erase") == 0) {
if (FLASH_CMD_NONE != o->cmd) { return(-1); }
if (o->cmd != FLASH_CMD_NONE) { return(-1); }
o->cmd = FLASH_CMD_ERASE;
} else if (strcmp(av[0], "read") == 0) {
if (FLASH_CMD_NONE != o->cmd) { return(-1); }
if (o->cmd != FLASH_CMD_NONE) { return(-1); }

o->cmd = FLASH_CMD_READ;
} else if (strcmp(av[0], "write") == 0) {
if (FLASH_CMD_NONE != o->cmd) { return(-1); }
if (o->cmd != FLASH_CMD_NONE) { return(-1); }

o->cmd = FLASH_CMD_WRITE;
} else if (strcmp(av[0], "reset") == 0) {
if (FLASH_CMD_NONE != o->cmd) { return(-1); }
if (o->cmd != FLASH_CMD_NONE) { return(-1); }

o->cmd = CMD_RESET;
} else {
Expand Down

0 comments on commit 2dd47a4

Please sign in to comment.