cmd: avoid decimal conversion
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>
Wed, 11 Sep 2019 13:39:53 +0000 (15:39 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 11 Oct 2019 19:33:27 +0000 (15:33 -0400)
This patch uses auto instead of decimal in simple_strtoul().

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
cmd/test.c

index fa0c349f082747e593b4bd21cd62e5fbbeed1d0d..258bfd880653d31a8196922f3ddaf876d402138b 100644 (file)
@@ -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);