@@ -32,7 +32,7 @@ bool InternalStorage::begin(){
3232 this -> userDataFileSystem = new LittleFileSystem (this ->partitionName );
3333 }
3434 int err = this -> userDataFileSystem -> mount (userData);
35- return err == 0 ? true : false ;
35+ return err == 0 ;
3636 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
3737 this -> blockDevice = QSPIFBlockDevice::get_default_instance ();
3838 this -> userData = new mbed::MBRBlockDevice (this ->blockDevice , this ->partitionNumber );
@@ -51,15 +51,15 @@ bool InternalStorage::begin(){
5151 this -> userDataFileSystem = new mbed::LittleFileSystem (this ->partitionName );
5252 }
5353 int err = this -> userDataFileSystem -> mount (this -> userData);
54- return err == 0 ? true : false ;
54+ return err == 0 ;
5555 #else
5656 return false ; // Unsupported board
5757 #endif
5858}
5959
6060bool InternalStorage::unmount (){
6161 int err = this -> userDataFileSystem -> unmount ();
62- return err == 0 ? true : false ;
62+ return err == 0 ;
6363}
6464
6565Folder InternalStorage::getRootFolder (){
@@ -83,18 +83,18 @@ bool InternalStorage::format(FileSystems fs){
8383 if (fs == FS_FAT){
8484 #if defined(ARDUINO_PORTENTA_C33)
8585 this -> userDataFileSystem = new FATFileSystem (this ->partitionName );
86- return this -> userDataFileSystem -> reformat (this -> userData) == 0 ? true : false ;
86+ return this -> userDataFileSystem -> reformat (this -> userData) == 0 ;
8787 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
8888 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 ;
9090 #endif
9191 } if (fs == FS_LITTLEFS) {
9292 #if defined(ARDUINO_PORTENTA_C33)
9393 this -> userDataFileSystem = new LittleFileSystem (this ->partitionName );
94- return this -> userDataFileSystem -> reformat (this -> userData) == 0 ? true : false ;
94+ return this -> userDataFileSystem -> reformat (this -> userData) == 0 ;
9595 #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
9696 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 ;
9898 #endif
9999 }
100100
0 commit comments