diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-02 00:15:36 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-12-01 18:33:38 +0300 |
commit | 7526deec7e52da92dee25aaf3a47514e639c2bb0 (patch) | |
tree | 7d6d7ebf4b1e2421986cd85ba96bfba8636a3a90 /common | |
parent | 90a9901764d71308192c96ecd7d735531fe9cc30 (diff) | |
download | u-boot-7526deec7e52da92dee25aaf3a47514e639c2bb0.tar.xz |
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 'common')
-rw-r--r-- | common/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/command.c b/common/command.c index 2c491e20a7..068cb55b4c 100644 --- a/common/command.c +++ b/common/command.c @@ -475,13 +475,13 @@ int cmd_get_data_size(char* arg, int default_size) case 'l': return 4; case 's': - return -2; + return CMD_DATA_SIZE_STR; case 'q': if (MEM_SUPPORT_64BIT_DATA) return 8; /* no break */ default: - return -1; + return CMD_DATA_SIZE_ERR; } } return default_size; |