mirror of
https://github.com/pine64/blisp.git
synced 2025-02-01 18:40:12 +00:00
Fix unitialized variable
This commit is contained in:
parent
7795de96ff
commit
c7bbb0a797
@ -36,6 +36,8 @@ get_binary_folder(char* buffer, uint32_t buffer_size) {
|
||||
}
|
||||
|
||||
void blisp_flash_firmware() {
|
||||
FILE* eflash_loader_file = NULL;
|
||||
|
||||
// TODO: We support currently only BL70X
|
||||
if (chip_type->count == 0 || strcmp(chip_type->sval[0], "bl70x") != 0) {
|
||||
fprintf(stderr, "Chip type is invalid.\n");
|
||||
@ -94,7 +96,7 @@ void blisp_flash_firmware() {
|
||||
get_binary_folder(exe_path, PATH_MAX); // TODO: Error handling
|
||||
snprintf(eflash_loader_path, PATH_MAX, "%s/data/%s/eflash_loader_32m.bin", exe_path, device.chip->type_str);
|
||||
|
||||
FILE* eflash_loader_file = fopen(eflash_loader_path, "rb"); // TODO: Error handling
|
||||
eflash_loader_file = fopen(eflash_loader_path, "rb"); // TODO: Error handling
|
||||
uint8_t eflash_loader_header[176];
|
||||
fread(eflash_loader_header, 176, 1, eflash_loader_file); // TODO: Error handling
|
||||
|
||||
@ -157,7 +159,6 @@ void blisp_flash_firmware() {
|
||||
|
||||
eflash_loader:
|
||||
|
||||
|
||||
exit1:
|
||||
if (eflash_loader_file != NULL) fclose(eflash_loader_file);
|
||||
blisp_device_close(&device);
|
||||
|
Loading…
Reference in New Issue
Block a user