diff options
| author | Lionel Debroux <lionel_debroux@yahoo.fr> | 2019-02-07 19:43:40 +0100 |
|---|---|---|
| committer | Lionel Debroux <lionel_debroux@yahoo.fr> | 2019-02-07 20:10:43 +0100 |
| commit | 943216dedaf6c5760886f93011163fda04ee6fa0 (patch) | |
| tree | 1a00f4ee754a0b87c32464aabc5301fd293a7e65 | |
| parent | 011b53fb97f18586d10664032bad7e6b2073ba99 (diff) | |
Make several const char / const char * arrays static to save a bit of space.
Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
| -rwxr-xr-x | main.c | 4 | ||||
| -rw-r--r-- | supervisor/shared/usb/usb.c | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -185,8 +185,8 @@ bool run_code_py(safe_mode_t safe_mode) { } else { new_status_color(MAIN_RUNNING); - const char *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt"); - const char *double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py", + static const char *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt"); + static const char *double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py", "main.txt.py", "main.py.txt", "main.txt.txt","main.py.py"); stack_resize(); diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index 136137f77..c77f1e417 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -43,7 +43,7 @@ void load_serial_number(void) { uint8_t raw_id[COMMON_HAL_MCU_PROCESSOR_UID_LENGTH]; common_hal_mcu_processor_get_uid(raw_id); - const char nibble_to_hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + static const char nibble_to_hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; for (int i = 0; i < COMMON_HAL_MCU_PROCESSOR_UID_LENGTH; i++) { for (int j = 0; j < 2; j++) { |
