X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=common%2Fcmd_setexpr.c;h=1b3edb7b02e4f9aa38b8334833f2be0e32fe2d63;hb=9c6b47d53ed329b31c5f26e9ec710f67559c07f0;hp=2d3719755e0d6fed3b6734bef16ece0b8e61e4ea;hpb=b46b353b901a45ebe860f8bf874ca99f018cd410;p=oweals%2Fu-boot.git diff --git a/common/cmd_setexpr.c b/common/cmd_setexpr.c index 2d3719755e..1b3edb7b02 100644 --- a/common/cmd_setexpr.c +++ b/common/cmd_setexpr.c @@ -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);