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>
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user