fclose and cosmetics

This commit is contained in:
3djc
2016-08-21 18:57:12 +02:00
parent a63657df40
commit a043c6f649
+3 -2
View File
@@ -1095,15 +1095,16 @@ void checkSDVersion()
FRESULT result = f_open(&versionFile, "/opentx.sdcard.version", FA_OPEN_EXISTING | FA_READ);
if ((result == FR_OK) && (f_size(&versionFile) == sizeof(REQUIRED_SDCARD_VERSION))) {
f_read(&versionFile, &version, sizeof(REQUIRED_SDCARD_VERSION), &read);
f_close(&versionFile);
if (strncmp(version, REQUIRED_SDCARD_VERSION, sizeof(REQUIRED_SDCARD_VERSION)-1) != 0) {
TRACE("sdCheckVersion FAILED: version are not the same");
ALERT(STR_SDCARDVERSIONWARN, STR_WRONG_SDCARDVERSION, AU_ERROR);
}
} else {
}
else {
TRACE("sdCheckVersion FAILED: opentx.sdcard.version cannot be opened");
ALERT(STR_SDCARDVERSIONWARN, STR_WRONG_SDCARDVERSION, AU_ERROR);
}
f_close(&versionFile);
}
}
#endif