提交 100e75bb 编写于 作者: T T Karthik Reddy 提交者: Tom Rini

cmd: avoid decimal conversion

This patch uses auto instead of decimal in simple_strtoul().
Signed-off-by: NT Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
上级 26c10609
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册