X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_setexpr.c;h=1ff12329bccb78f2b58df1c60559bfd9b4fc5b30;hb=a14a94469c21feebad34e37d4881110e1469f415;hp=2d3719755e0d6fed3b6734bef16ece0b8e61e4ea;hpb=ffa37fc98d71ef930bccd4e9eed37f6ce6b4d6af;p=u-boot diff --git a/common/cmd_setexpr.c b/common/cmd_setexpr.c index 2d3719755e..1ff12329bc 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_usage(cmdtp); w = cmd_get_data_size(argv[0], 4);