@@ -32,7 +32,7 @@ bool InternalStorage::begin(){
32
32
this -> userDataFileSystem = new LittleFileSystem (this ->partitionName );
33
33
}
34
34
int err = this -> userDataFileSystem -> mount (userData);
35
- return err == 0 ? true : false ;
35
+ return err == 0 ;
36
36
#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
37
37
this -> blockDevice = QSPIFBlockDevice::get_default_instance ();
38
38
this -> userData = new mbed::MBRBlockDevice (this ->blockDevice , this ->partitionNumber );
@@ -51,15 +51,15 @@ bool InternalStorage::begin(){
51
51
this -> userDataFileSystem = new mbed::LittleFileSystem (this ->partitionName );
52
52
}
53
53
int err = this -> userDataFileSystem -> mount (this -> userData);
54
- return err == 0 ? true : false ;
54
+ return err == 0 ;
55
55
#else
56
56
return false ; // Unsupported board
57
57
#endif
58
58
}
59
59
60
60
bool InternalStorage::unmount (){
61
61
int err = this -> userDataFileSystem -> unmount ();
62
- return err == 0 ? true : false ;
62
+ return err == 0 ;
63
63
}
64
64
65
65
Folder InternalStorage::getRootFolder (){
@@ -83,18 +83,18 @@ bool InternalStorage::format(FileSystems fs){
83
83
if (fs == FS_FAT){
84
84
#if defined(ARDUINO_PORTENTA_C33)
85
85
this -> userDataFileSystem = new FATFileSystem (this ->partitionName );
86
- return this -> userDataFileSystem -> reformat (this -> userData) == 0 ? true : false ;
86
+ return this -> userDataFileSystem -> reformat (this -> userData) == 0 ;
87
87
#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
88
88
this -> userDataFileSystem = new mbed::FATFileSystem (this ->partitionName );
89
- return this -> userDataFileSystem -> reformat (this -> userData) == 0 ? true : false ;
89
+ return this -> userDataFileSystem -> reformat (this -> userData) == 0 ;
90
90
#endif
91
91
} if (fs == FS_LITTLEFS) {
92
92
#if defined(ARDUINO_PORTENTA_C33)
93
93
this -> userDataFileSystem = new LittleFileSystem (this ->partitionName );
94
- return this -> userDataFileSystem -> reformat (this -> userData) == 0 ? true : false ;
94
+ return this -> userDataFileSystem -> reformat (this -> userData) == 0 ;
95
95
#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
96
96
this -> userDataFileSystem = new mbed::LittleFileSystem (this ->partitionName );
97
- return this -> userDataFileSystem -> reformat (this -> userData) == 0 ? true : false ;
97
+ return this -> userDataFileSystem -> reformat (this -> userData) == 0 ;
98
98
#endif
99
99
}
100
100
0 commit comments