aboutsummaryrefslogtreecommitdiff
path: root/cmd/mem.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-01 14:15:36 -0700
committerTom Rini <trini@konsulko.com>2020-12-01 10:33:38 -0500
commit7526deec7e52da92dee25aaf3a47514e639c2bb0 (patch)
tree7d6d7ebf4b1e2421986cd85ba96bfba8636a3a90 /cmd/mem.c
parent90a9901764d71308192c96ecd7d735531fe9cc30 (diff)
downloadu-boot-7526deec7e52da92dee25aaf3a47514e639c2bb0.zip
u-boot-7526deec7e52da92dee25aaf3a47514e639c2bb0.tar.gz
u-boot-7526deec7e52da92dee25aaf3a47514e639c2bb0.tar.bz2
command: Add constants for cmd_get_data_size string / error
At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/mem.c')
-rw-r--r--cmd/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/mem.c b/cmd/mem.c
index 56e1d07..1d4f2ba 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -393,7 +393,7 @@ static int do_mem_search(struct cmd_tbl *cmdtp, int flag, int argc,
* Defaults to long if no or incorrect specification.
*/
size = cmd_get_data_size(argv[0], 4);
- if (size < 0 && size != -2 /* string */)
+ if (size < 0 && size != CMD_DATA_SIZE_STR)
return 1;
argc--;