求教函数体内出现多个return的情况
求教大家一个函数:程序代码:
U8 retry=0; U8 i; Ctrl_status status; // Possibility to ignore the disk check. Used to take time during multi read/write access if( g_b_no_check_disk ) return TRUE; if( 0xFF == fs_g_nav.u8_lun ) { fs_g_status = FS_ERR_HW; return FALSE; // No device selected } for( retry=0 ; retry<100 ; retry++ ) { // Check device status = mem_test_unit_ready( fs_g_nav.u8_lun ); if( CTRL_GOOD == status ) return TRUE; // drive ready //* HERE error or state change // Clean all navigator datas which use this device fs_g_nav_fast.u8_type_fat = FS_TYPE_FAT_UNM; // By default the fat isn't mounted Fat_file_close; // By default the file is not open