Skip to content

Commit

Permalink
cmd: avoid decimal conversion
Browse files Browse the repository at this point in the history
This patch uses auto instead of decimal in simple_strtoul().

Signed-off-by: T Karthik Reddy <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
  • Loading branch information
T Karthik Reddy authored and trini committed Oct 11, 2019
1 parent 26c1060 commit 100e75b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cmd/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,28 @@ static int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
expr = strcmp(ap[0], ap[2]) > 0;
break;
case OP_INT_EQ:
expr = simple_strtol(ap[0], NULL, 10) ==
simple_strtol(ap[2], NULL, 10);
expr = simple_strtol(ap[0], NULL, 0) ==
simple_strtol(ap[2], NULL, 0);
break;
case OP_INT_NEQ:
expr = simple_strtol(ap[0], NULL, 10) !=
simple_strtol(ap[2], NULL, 10);
expr = simple_strtol(ap[0], NULL, 0) !=
simple_strtol(ap[2], NULL, 0);
break;
case OP_INT_LT:
expr = simple_strtol(ap[0], NULL, 10) <
simple_strtol(ap[2], NULL, 10);
expr = simple_strtol(ap[0], NULL, 0) <
simple_strtol(ap[2], NULL, 0);
break;
case OP_INT_LE:
expr = simple_strtol(ap[0], NULL, 10) <=
simple_strtol(ap[2], NULL, 10);
expr = simple_strtol(ap[0], NULL, 0) <=
simple_strtol(ap[2], NULL, 0);
break;
case OP_INT_GT:
expr = simple_strtol(ap[0], NULL, 10) >
simple_strtol(ap[2], NULL, 10);
expr = simple_strtol(ap[0], NULL, 0) >
simple_strtol(ap[2], NULL, 0);
break;
case OP_INT_GE:
expr = simple_strtol(ap[0], NULL, 10) >=
simple_strtol(ap[2], NULL, 10);
expr = simple_strtol(ap[0], NULL, 0) >=
simple_strtol(ap[2], NULL, 0);
break;
case OP_FILE_EXISTS:
expr = file_exists(ap[1], ap[2], ap[3], FS_TYPE_ANY);
Expand Down

0 comments on commit 100e75b

Please sign in to comment.