We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f22836 commit 1868af1Copy full SHA for 1868af1
src/SD.cpp
@@ -378,15 +378,18 @@ void File::close()
378
{
379
if (_name) {
380
#if _FATFS == 68300
381
- if (_fil && _fil->obj.fs != 0) {
+ if (_fil) {
382
+ if (_fil->obj.fs != 0) {
383
#else
- if (_fil && _fil->fs != 0) {
384
385
+ if (_fil->fs != 0) {
386
#endif
- /* Flush the file before close */
- f_sync(_fil);
387
+ /* Flush the file before close */
388
+ f_sync(_fil);
389
- /* Close the file */
- f_close(_fil);
390
+ /* Close the file */
391
+ f_close(_fil);
392
+ }
393
free(_fil);
394
}
395
0 commit comments