]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_setexpr.c
cfi: Make the flash erase and write operations abortable
[karo-tx-uboot.git] / common / cmd_setexpr.c
index 2d3719755e0d6fed3b6734bef16ece0b8e61e4ea..1b3edb7b02e4f9aa38b8334833f2be0e32fe2d63 100644 (file)
@@ -32,7 +32,7 @@ static ulong get_arg(char *s, int w)
 {
        ulong *p;
 
-        /*
+       /*
         * if the parameter starts with a '*' then assume
         * it is a pointer to the value we want
         */
@@ -50,17 +50,15 @@ static ulong get_arg(char *s, int w)
        }
 }
 
-int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        ulong a, b;
        char buf[16];
        int w;
 
        /* Validate arguments */
-       if ((argc != 5) || (strlen(argv[3]) != 1)) {
-               cmd_usage(cmdtp);
-               return 1;
-       }
+       if ((argc != 5) || (strlen(argv[3]) != 1))
+               return CMD_RET_USAGE;
 
        w = cmd_get_data_size(argv[0], 4);